Model management

From pollinations/pollinations · View interactive version

Model management is an AI agent skill from the GitHub repository pollinations/pollinations. Add, update, rename, reroute, price, or remove Pollinations text, image, video, audio, embeddings, realtime, OCR, SVG, and 3D models. Use for model research, provider changes, capability or public-endpoint edits, and model PRs.

How to use this skill

Skill file

Model management

Use this workflow for every model change. Keep the implementation minimal, preserve the public contract unless the user explicitly approves a change, and prove provider behavior with real requests.

Load context first

  1. Read the repository AGENTS.md.
  2. Read the live registry entry, runtime config, handler, schemas, and tests. The repository is the source of truth for what Pollinations currently offers.
  3. Read the relevant local active plan when present:
  1. Check GitHub for open or merged PRs that may already implement or conflict with the work.
  2. Check current official provider documentation, catalog, pricing, availability, quotas, and deprecation notices. Then probe the exact route; the live response wins over documentation.

The temp plans are ignored operational state, not repository truth. When working in a linked worktree where they are absent, locate the primary checkout with git worktree list and read them there. Never copy balances, prices, PR statuses, quotas, or candidate rankings into this skill.

Read operating-policy.md before recommending a route or model. Read only the other references needed for the task:

| Task | Required references |

|---|---|

| Find code or run locally | repository-and-local-testing.md |

| Add, update, reroute, rename, or remove | change-and-test-matrix.md |

| New model, provider, model ID, or price | billing-verification.md |

Mandatory confirmation gate

Apply this gate only to a proposed tracked model mutation. Do not turn a

read-only status confirmation, an approval of an already-documented planning

decision, or a correction of an operational fact into a different mutation.

Treat a generic “confirm” as approval only for the exact contract just shown.

Do not edit any model until the user confirms its complete business and inference contract. Inspect the code and provider first; do not ask the user to discover values for you.

Show one complete row per model:

| Field | Required value |

|---|---|

| Canonical name | Public model ID after the change |

| Aliases | Every compatibility alias, or none |

| priceMultiplier | Exact multiplier after provider cost |

| paidOnly | Whether purchased pack balance is required |

| Pollinations GPU | yes only if Pollinations operates the production hardware |

| Registry provider | Configured primary provider |

| Primary route | Provider, deployment/host, and exact upstream model ID |

| Best fallback candidate | Provider, deployment/host, exact upstream model ID, and why it is the best viable alternative; or none found with the searched routes |

| Pollinations fallback | use <candidate> or none, with the reason for declining or lacking a viable candidate |

Ask:

Please confirm: canonical name X, aliases A/none, price multiplier M, paid-only yes/no, Pollinations GPU yes/no, registry provider P, primary route R, best fallback candidate C/none found, and Pollinations fallback decision use C/none. Are all of these correct?

An answer approves only the values shown. If a value is unknown, inferred, conflicting, or route-dependent, label it UNKNOWN, explain the evidence, and wait for that exact decision. A batch approval is valid only when every row is complete.

Public API changes require separate confirmation

Model approval does not authorize adding, renaming, removing, or changing a public endpoint, method, transport, request or response schema, streaming behavior, or event protocol. Do not propose an API-surface change without a concrete user or developer problem it solves.

Before editing, present:

State plainly: This adds/changes the public API: ... Then ask for explicit confirmation of that exact API change. If the problem, standard, or compatibility impact is unclear, do not edit.

Secrets are a separate approval

Model approval never authorizes adding, rotating, synchronizing, deploying, revoking, or otherwise mutating a credential. Follow the exact approval wording, execution order, verification, and rollback rules in AGENTS.md. Do not duplicate or weaken that process here.

Workflow

1. Reconcile current state

working for keys that stored the old ID only while the old ID stays an

alias. A model that changes category changes which restricted keys reach

it; state that in the PR.

decision on that route; on chat endpoints, text also allows them.

the current production revision; production can lag behind main.

and gh pr list --state merged --search <model> before re-adding it — it may have been

removed on purpose, added and reverted, or replaced.

2. Research the exact route

For direct Novita discovery, use the supported

model catalog

and account quotas with an

existing authorized key. Quota queries require modal=llm; query RPM and

TPM separately with productType=Public Endpoint and the exact model as

quotaObject, then check the returned identity. The OpenAI-compatible base is

https://api.novita.ai/openai/v1; probe the exact upstream model using

Chat Completions.

Request stream_options.include_usage for streaming and prove terminal usage,

cache/reasoning billing, capabilities and burst capacity through local Gen

before routing traffic. Gateway availability does not prove direct access or

independent capacity: OpenRouter/Vercel routes backed by Novita can share the

same upstream pool. Keep direct provider attribution and charges distinct from

gateway-billed traffic; use the Economics Novita connector guide for supported

billing sources. Preserve the existing public contract and fallback mechanism.

3. Confirm the contract

Present the mandatory row and obtain explicit confirmation before editing. If a capability or access change is intentional, state it plainly.

4. Implement the smallest complete change

Check the website’s Playground overrides on every model change. Play reads the public catalog first. Put verified model-specific UI rules that the catalog cannot express in this JSON under the exact canonical ID, with a short reason and source. Add missing entries in the same model PR, update affected entries on changes or renames, and delete obsolete entries on removal. Models that work from catalog data alone need no entry. Review recurring rules monthly for possible registry fields. Discuss any public API addition before promoting it, then remove the duplicate rule.

components lowercase, preserve the publisher's model family and version,

and follow the publisher's public slug when one exists. Never invent, drop,

or silently advance a version.

the inference provider. Keep provider deployment IDs, casing, punctuation,

and revision suffixes internal when they are routing details rather than the

publisher's public model identity.

same publisher model across providers behind one public identity and declare

automatic routing through the registry's ordered fallback relationship.

The public registry key, catalogs, request model, and permissions remain the

public ID. Keep fallback identity separate from priority: never use

:fallback, numbered fallback suffixes, or priority labels in these IDs.

<public-canonical-id>:<provider>:<route-qualifier>, such as

google/gemini-2.5-flash-lite:openrouter:vertex-global or

google/gemini-2.5-flash-lite:openrouter:ai-studio. Distinguish multiple

deployments through the same provider explicitly. Use lowercase labels;

never encode priority or the temporary fallback role. Preserve fallback

registry IDs when changing their order. For provider-managed routing without

a fixed backend, do not invent an endpoint qualifier.

does not select an upstream endpoint. Keep fallback-only entries hidden,

without aliases, and excluded from catalogs and direct model selection.

Route-specific cost belongs on the serving definition; callers retain the

requested public model's price. Use the existing shared fallback mechanism.

provider, per-attempt, community and cache attribution semantics during a

canonical rename. Recorded IDs may adopt the new spelling, including hidden

fallback registry IDs; do not force primary IDs into execution identifiers.

Explicit primary execution IDs and their analytics/header contract are

deferred to #14543.

Review affected consumers and any public API changes separately; do not

silently repurpose x-model-used or rewrite historical events.

naming an internal route. For example, a route for

google/gemini-2.5-flash-lite:search could be

google/gemini-2.5-flash-lite:search:openrouter:ai-studio.

These are naming examples, not declarations of configured routes. Link

routes through explicit registry keys; do not split or strip colon suffixes

to infer providers or fallback relationships. The fallback must preserve

the public model's behavior, including search in this example.

of the exact same publisher model, expose it as

<public-canonical-id>:paid, never with the inference provider in the slug.

Treat it as a separate public contract with its own price, paidOnly value,

permissions, and aliases. Do not use :paid for automatic fallback routing.

publisher model, consolidate them under that model identity and select the

operation through an explicit endpoint or request field. Do not create a

second canonical model or make an alias select behavior.

or a billing header such as fal's x-fal-billable-units. Do not rebuild the

provider's formula (rounding, minimums, per-reference units, parameter

multipliers) from the request. When the route reports nothing, derive usage

from the request and reconcile it against the provider's billing records.

one D1 migration PR. Replace old IDs, preserve unrelated fields and array

order, deduplicate old/new pairs, prove idempotence, and verify all

audited old-ID counts are zero after deployment.

per alias, and prefilter with instr() inside CASE so JSON functions never

run on non-matching rows. A single whole-table JSON scan fails with error

7429 at production scale (~150k apikey rows).

catalog for public listings rather than maintaining a duplicate Markdown list.

non-zero base rate and cost-variant rate as baseRate * 1.055 (for example,

perMillion(0.75) * 1.055). Include search, cache-storage, and other billable

adjustments, including provider-reported charges. Keep priceMultiplier

unchanged; prices derive from the fee-inclusive cost. Declare this in the

registry entries, not a provider-wide transformation. Apply the fee exactly

once: same-provider fallbacks may inherit fee-inclusive rates; cross-provider

fallbacks need explicit costs when inheritance would add or omit the fee.

Service Providers

page. Update its model-provider line in the same PR;

gen.pollinations.ai/test/service-providers.test.ts fails until it matches.

onboarded to Economics in the same change: add its identity/model mappings

to operations/dashboards/economics/provider-registry.json and create or update its

single <vendor-id>.json in the private Drive Vendor journals folder, using

the Economics collection workflow.

Verify category, collection method, review/balance tracking and known accounts;

record unknowns rather than inventing balances, contracts or forecast rules.

Reuse existing vendor files; keep private account and contract details out of Git.

5. Verify end to end

existing authorized access, confirm the provider IDs match the Economics

registry, and verify the dashboard loads with that snapshot. Public GitHub CI

uses synthetic data and does not need Drive credentials. Missing onboarding

or unavailable private validation blocks release; never rely on the dashboard

failing at runtime to enforce this check.

6. Open the PR

Before publishing:

Scheduled merges and holds
PR description

Decision first, at most ~150 words, no narrative:

**Decision:** ready to merge | needs your call: <question>

`<model ID>` · effective on production deploy | YYYY-MM-DD HH:MM UTC

| | Before | After |
| --- | --- | --- |
| Access | | |
| Price (USD per unit) | | |
| Primary · cost | | |
| Fallback · cost | | |
| Promo | | |
| Capabilities | | |

**Verified:** <routes × capabilities> · provider charge = our cost · wallet = price
**Flags:** <only if action is needed>

| Model | Action | Change | Before | After | Effective |

| --- | --- | --- | --- | --- | --- |

| <model ID> | RETIRE | Availability | Available | Retired | YYYY-MM-DD HH:MM UTC |

Completion gate

A model change is not complete until all applicable statements are true:

from the provider's reported usage whenever the route reports it.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.