Model marketplace and deployment prices
The marketplace syncs from Modelink every day. Models no longer returned by the source are marked as delisted while their full records remain available. Other suppliers may still offer them. Delisting does not disable deployments or delete usage records.
Sync and confirmation
The initial schedule runs within a minute and then every 24 hours. Existing schedules, including explicitly disabled ones, are preserved. Administrators can sync immediately or change the schedule. Names, descriptions, capabilities, modalities, context limits, documentation and complete pricing rules are refreshed. Failed syncs retain the previous snapshot, record failure status and retry after one hour when scheduling is enabled.
Market data is stored separately from the accepted billing baseline. Neither syncing nor restarting changes deployed prices automatically. The deployment price tab compares current and proposed prices with nothing selected by default. Administrators can review one deployment or a selected batch; manually configured prices have an explicit replacement warning. Market quotes may differ from supplier contracts.
Confirmation sends only deployment IDs and preview versions. The server calculates the rates again and rejects the whole batch with 409 if any price or configuration changed. Successful updates persist deployment rates without recalculating existing bills.
Quick updates support fully expressible single-tier text Token rates, cache reads/writes, complete peak/off-peak rates and explicit per-search rates. Multiple context tiers, conditional modality/reasoning prices, unknown dimensions, missing prices and incomplete windows require manual configuration. The marketplace still displays their complete rules; nothing is silently reduced to the first tier or treated as free.
New supported catalog-priced deployments capture the latest market rates. Existing complex catalog entries retain their creation behavior; new complex source entries need manual prices. YAML deployments are managed in their configuration files. Runtime activation follows existing deployment editing behavior: the current gateway's in-memory directory is updated. Cross-instance configuration broadcasting is outside this change.
Management API
Existing administrator session permissions apply; ordinary users and virtual keys cannot apply prices.
GET /price/catalog: source metadata, delisting, local overrides and completepricing_rules_v2.POST /reload/model_cost_map: sync market data now; source failure returns 502.GET /schedule/model_cost_map_reload/status: schedule, last attempt, last success and error status.POST /schedule/model_cost_map_reload?hours=24orDELETE /schedule/model_cost_map_reload: save or disable scheduling; the interval must be 1–168 hours.GET /price/deployments: current/proposed rates, differences, unsupported reason and version; unavailable storage returns 503.POST /price/deployments/apply: confirm 1–500 deployments. Invalid input returns 400, unauthorized access 401/403, conflicts, missing or ineligible deployments 409, storage failures 500 and unavailable storage 503.
{"items":[{"id":"deployment-id","version":"preview-version"}]}Persistence and compatibility
| Record | Storage key |
|---|---|
| Daily market data | market_snapshot/catalog |
| Accepted billing baseline | price_snapshot/catalog |
| Local overrides | price_model/<model ID> |
| Local visibility | price_listing/<model ID> |
| Confirmed deployment rates | proxy_models.litellm_params_json.rates |
| Schedule and sync status | model_cost_map/reload |
No existing tables are migrated or deleted. The first successful sync freezes the existing baseline; future syncs do not replace it. Local models, providers and visibility settings are retained. The default source is https://api.modelink.ai/v1/market/models; XHUB_PRICE_FEED_URL can select a mirror. Sync fetches run outside database transactions. Short transactions use unique attempt identifiers to discard stale results; schedule changes and price confirmation do not wait for the upstream request. Price confirmation waits at most five seconds for the transaction lock without holding the inference model lock.
Disable scheduling before rolling back to an older binary, which may automatically replace the accepted billing baseline. Confirmed rates use the existing rates format. This change adds no inbox and changes no authorization, budget rules or coverage threshold.
Verification
go test ./internal/catalog ./internal/gateway/models ./internal/store -count=1
go test ./cmd/regression -run '^TestModelContractMarketPriceConfirmation$' -count=1
bash scripts/e2e.sh e2e/scenarios/legacy/price-feed/sc-111.test.tsTests use real PostgreSQL, local source and protocol servers, including actual billed requests before and after confirmation, atomic conflict handling, historical bills, delisting/restoration, failed syncs, restarts and Chinese/English browser operations. Supplier credentials and contractual prices are not assumed.
Official references and explicit manual updates
Deployment price updates compare both deployed prices and the Modelink candidate against the exact upstream model's official reference. Ordinary input, output, cache reads and each cache-write TTL are separate dimensions. Unknown total-input boundaries, output conditions or time windows remain unknown. Modelink sync is independent of reconciliation source connections.
Automatic pricing defaults off. An explicitly enabled deployment updates only with complete, supported prices matching an unexpired reviewed reference and no recorded conflict. The current bundled source review date is 2026-12-01 with a 7-day review lifetime. That lifetime measures evidence freshness, not the provider's price effective interval or continuous website verification. A newly reviewed, versioned price card is needed to refresh that evidence; rechecking only compares again and cannot renew its date. Unsupported exact models, historical models and DeepSeek time pricing without sufficient holiday evidence retain unknown status and the deployed prices.
A later Modelink sync cannot erase a detected conflict. Review the source and select “Recheck official reference”; only an actual matching comparison permits recovery. For a manual conflict, first select “Resolve manual conflict”, enter a reason and confirm. The result remains unverified until explicitly rechecked. Neither action changes prices. If another reviewer changes the record while the dialog is open, the stale action returns 409 and preserves the entered reason. Both /price/deployments/reference and /price/deployments/reference/check require reference_version from the preview's official_reference.revision.
Administrators can still explicitly review and adopt supplier prices when the official reference is unknown or differs. The confirmation warns about this and does not clear a recorded conflict. New requests use the new deployment prices; historical bills are unchanged. Pricing history includes authorization, reference decisions and before/after price snapshots. A failed audit or storage write rolls back the pricing transaction.
This comparison covers first-party global standard text pricing. It does not certify batch, priority, regional, tool or multimodal charges. The pure comparator accepts trusted, versioned price cards for future registry integration; there is currently no endpoint that accepts a user's assertion of official status or imports an arbitrary URL as an official price card.
Recovering from expired references in this version
Official price cards currently exist only in the compiled pricing.Profiles() registry. There is no standalone rule-package upload, reference-data management or online official-source refresh. Price-data edits/imports and Modelink refreshes update quoted prices, not the official review date. Rechecking the same expired snapshot therefore continues to return expired and retains deployed prices.
Ask your maintainer for an XHub version containing newly reviewed official price cards and upgrade. Refresh the deployment comparison, explicitly recheck, and let the existing automatic policy reevaluate on the next successful market sync. Until such a version is available, retain current prices or manually review and confirm agreed supplier prices; this does not certify official pricing. Changing a date, resolving a manual conflict or refreshing Modelink is not a new review of an official source.
A later phase can reuse the price-data management UI and audit interactions for an independent versioned official-reference registry with validated evidence import and activation. An editable quote must never become a trusted official reference solely by assertion; source, rule completeness and freshness need verification, while old versions remain available for historical replay. This data maintenance feature is not implemented yet; see #368.