Repository navigation
TokenHub v0.11.0 brings subscription accounts into the same AI gateway, adds provider pricing schedules and linked model prices, improves multi-turn image conversations, and makes model onboarding and daily operations smoother.
This release covers all changes since v0.10.0, including 16 merged pull requests. The complete pull-request and commit inventories are included below.
Highlights
- One gateway for subscription accounts: manage accounts such as ChatGPT, Claude Code, GitHub Copilot, Cursor, and Kiro through existing authentication, routing, resource pools, and usage accounting. The supported inventory now covers 35 account-provider IDs, including the existing Codex integration.
- Publish models in bulk: select matching provider models and create a public model with its initial route for each selection. Expired subscription accounts can sign in again without rebuilding their routes and settings.
- Pricing that follows your operating schedule: configure provider rates by timezone, time window, weekday, and effective date; optionally link a chat model's public pricing to one confirmed upstream pricing policy.
- More reliable image conversations: supported OpenAI/Azure Responses routes retain provider-bound image continuations, while Codex/ChatGPT replay handling supports larger transcripts and optional zstd compression.
- Faster, more dependable administration: refresh provider catalogs manually or on a schedule, navigate model lists faster, and keep provider management usable while monitoring loads.
- Cleaner operations: distinguish client disconnects from gateway failures, retain valid Redis concurrency leases, and improve routing diagnostics and RAGFlow compatibility.
Detailed changes
Subscription accounts and model onboarding
- Integrate subscription account authorization, discovery, routing, resource pools, and usage accounting. The coverage inventory contains six native integrations and 29 bundled community integrations: native Claude Code, OpenAI Codex, GitHub Copilot, ChatGPT API, Gemini CLI, and Antigravity, plus community integrations including Cursor, Kiro, Qoder, QwenWork, WorkBuddy, Grok, Factory, Devin, Zed, Kimi Work, MiniMax Coding Plan, Cline, and Trae. Authentication and inference capabilities remain provider-specific. (#402)
- Add browser/device authorization or explicit session import as supported by each provider, recognizable brand icons, clearer authorization failures, and reauthorization directly onto an existing expired account. Preserve its routes, scheduling, and administrator settings. (#402)
- Harden token refresh and credential rotation, account replacement and observation isolation, authorization callbacks, shutdown/cancellation persistence, request/response boundaries, stream handling, upstream errors, reasoning defaults, retry delays, and quota reporting. Improve WorkBuddy streaming, Google region/egress errors, and Grok inference authorization. (#402)
- Add bulk selection and provider-model import into the Model Directory, creating one same-name public model and initial route per selection. Include explicit client prices, upstream-cost confirmation, conflict checks, partial retries, blocked-import explanations, and completion feedback. Separate model creation from provider import actions. (#402)
- Add 12 API-key provider presets for regional, token, and coding plans. Refresh model/plan discovery and preserve declared output-token limits during import. (#389, #402)
Catalogs, pricing, and administration
- Expand standard model templates from 267 to 299 and static provider catalog entries from 160 to 172. The catalog refresh covers 25 provider catalogs with 145 new offers and 107 updates, including lifecycle, retirement/redirection, regional access, and reference-price evidence. Preserve existing routes and configured costs, and interpret date-only lifecycle notices conservatively. (#389, #402)
- Add supported synchronous native Gemini 4 Argon flows with a 65,536-token output limit and low/medium/high thinking. Background long decoding and other specialized unsupported operations are outside this support scope. (#389)
- Cache public provider catalog snapshots within a 24-hour freshness window, retain local data when the upstream is unavailable, and add an explicit console sync action and administration endpoint. Coordinate scheduled refreshes across instances, support mirrors/offline configuration, honor disabled scheduling, and update the catalog in place. (#411)
- Cache normalized model-category definitions and precompute sorting lookups to reduce model-directory navigation overhead. Derive
tool_choice,parallel_tool_calls,top_p,stop, andseedfrom explicit capability flags, validate tool dependencies, and refresh verified Z.AI Coding Plan declarations. (#413, #422) - Add visual provider pricing schedules for input, cached-input, output, and advanced cache-write rates, with timezone, local time window, weekday, and effective-date controls. Preserve editor drafts, schedule identity, recovery data, and source evidence through inventory refreshes; reject incomplete schedule clocks. (#423)
- Let a chat model follow one explicitly selected upstream model's confirmed pricing policy across its routes and failover. Capture an immutable price snapshot at admission; source edits apply to later requests. Preserve custom prices when switching modes, bound source resolution, and return
503 model_pricing_source_unavailablebefore quota admission when a linked source is unusable. (#423) - Aggregate provider monitoring observations in SQL into bounded daily results, cache summaries for 15 seconds, coalesce concurrent refreshes, and bound database work to 10 seconds. Load provider lists/actions independently, cancel stale monitoring requests, and preserve existing signal windows and exact median semantics. (#431)
Responses, images, and protocol compatibility
- Retain provider-bound response bindings for eligible OpenAI/Azure multi-turn image conversations. Validate replayed input boundaries, send only new input items on matching continuations, and fall back to a bounded full-transcript retry when upstream bindings are missing or expired. Publish background bindings only after approved successful completion. Other store-capable providers can explicitly opt in. (#410)
- Raise the default
/v1/responsesingress limit to 128 MiB, with a 512 MiB hard ceiling. Permit Codex/ChatGPT subscription full-transcript forwarding up to that read ceiling. Add optional upstream zstd request compression and one uncompressed retry when the upstream explicitly rejects the encoding. Other routes retain their configured forward limits. (#410) - Accept mid-conversation Anthropic
systemmessages without the obsolete beta header, preserving ordering and content for native and bridge routes. OpenAI-compatible upstreams may still reject mid-conversation system messages; those upstream restrictions remain. (#408) - Accept and discard Boolean RAGFlow
drop_paramsembedding hints;nullis treated as omitted. Keep other parameter validation strict and leave upstream payloads and cache keys unchanged. (#430)
Routing, reliability, and privacy
- Surface aggregated Jev admission reasons in
details.reasons, with candidate counts and a ten-entry cap. Preserve existing public status/error codes and withhold provider/model/candidate identities while keeping detailed audit evidence. (#420) - Admit shared controls such as
store,service_tier,safety_identifier,prompt_cache_options, andprompt_cache_retentionwithout model declarations only when the effective adapter forwards the OpenAI body and supports the incoming endpoint. Retain explicit denials and translating-adapter gates. (#421) - Renew existing healthy Redis API-key/user concurrency leases without treating an updated member as a lost lease. Prevent false request cancellations while retaining cancellation for genuinely missing leases. (#429)
- Record confirmed caller disconnects as
499/request_cancelled, suppress retries and circuit-breaker penalties, and exclude that exact pair from operational error totals and trace error status. Continue accounting for requests, latency, reported tokens, and costs; internal cancellations, timeouts, and provider failures retain their error classifications. (#432) - Detect valid birth dates with single-digit months/days, including
1990年1月5日, while rejecting impossible dates. (#385)
Console, documentation, and engineering
- Adapt sign-in to smaller screens, prioritize the login form, improve mobile SSO and translated layouts, provide 44px controls, and improve dark-theme language-icon contrast. Expand named UI acceptance scenarios and stabilize asynchronous routing/database-cancellation checks. (#403)
- Split the complete backend server suite into four automatically discovered CI shards. Add bundled subscription-adapter tests and PostgreSQL regression coverage for OAuth registration and provider monitoring. (#402, #431)
- Fix the frontend container build by including the shared subscription inventory required by TypeScript-checked fixtures. Extend the container build-context test to run the actual frontend production builder, catching missing repository-level fixture dependencies during deployment checks.
- Synchronize shared user documentation in English, Simplified Chinese, and Japanese; refresh contributor acknowledgments; and update backend, frontend, SDK, Docker, and Helm application versions to 0.11.0.
Upgrade notes
- Back up the database before upgrading. The schema advances from 9 to 11: migration 10 adds subscription OAuth registrations and migration 11 adds Responses image-store bindings. The release compatibility manifest targets schema 11 and declares schema 11 as both its minimum and maximum. Plan a coordinated upgrade; do not assume mixed-version operation or that an old binary can safely use the upgraded database. Consult the database evolution guide.
- Subscription runtime requirements: bundled community workers require Node.js 22.23.1 or newer. Supported Docker/native bundles include it; standalone backend deployments need a compatible
nodeonPATH. Claude Code additionally requires a genuine installedclaudeCLI, which is not bundled. OAuth callbacks must reach the appropriate instance. Upstream subscription entitlements and region restrictions still apply; Trae adapters are experimental, and Kimi Work uses explicit session JSON import. Community adapters expose public Chat, with streaming/tools depending on upstream support; they do not universally expose Responses, embeddings, or media. See subscription providers. - Linked pricing is opt-in and chat-only. Rates are maintained by administrators; this is not automatic supplier-price scraping or invoice reconciliation. Before downgrading to a release without linked pricing, switch affected models to custom pricing and verify the stored rates, in addition to checking database compatibility. See billing and pricing.
- Review upstream image retention. Eligible OpenAI/Azure image requests carrying an explicit Codex session identifier enable upstream
store:trueby default, with approximately 30-day retention. Set provider/resourceresponses_store=offto disable this; other providers requireresponses_store=onto opt in. ChatGPT/Codex subscription routes retainstore:false, discardprevious_response_id, and do not acquire stored-response continuations. Optional compression usesresponses_request_compression=on. See Codex and Responses configuration. - Align reverse-proxy upload limits. Backend Responses ingress now defaults to 128 MiB, but Compose nginx still defaults to
32m. RaiseTOKENHUB_NGINX_CLIENT_MAX_BODY_SIZEwhen larger image transcripts are required. Helm ingress defaults to128m; other upstream routes and mixed-provider failover retain the configured multimodal forward limit, normally 32 MiB. - Catalog configuration:
TOKENHUB_PROVIDER_CATALOG_UPSTREAM_URLselects a mirror; an explicit empty value disables external fetching.TOKENHUB_PROVIDER_CATALOG_SYNC_INTERVAL_SECONDSdefaults to86400;0disables scheduled sync. Catalog refresh does not automatically rewrite already imported model inventory or its parameter declarations. See deployment and catalog updates.
Distribution
- Multi-architecture container:
ghcr.io/astaxie/tokenhub-backend:0.11.0(linux/amd64,linux/arm64). Stable aliases:0.11andlatest. - Native Linux bundles:
tokenhub_0.11.0_linux_amd64.tar.gzandtokenhub_0.11.0_linux_arm64.tar.gz, withchecksums.txtattached to this release.
Complete pull-request inventory
- #389 — feat(catalog): refresh model offers and lifecycle boundaries by @deepjerry-ai
- #403 — fix(auth): adapt login layout to smaller screens by @astaxie
- #402 — feat(providers): add subscription account support by @astaxie
- #408 — fix(anthropic): accept system messages without legacy beta by @wozhenbang2004
- #385 — fix(guardrails): validate birth dates with single-digit month or day by @tangsong404
- #413 — perf(console): stop rebuilding model category definitions per lookup by @kiddyt00
- #422 — fix(catalog): derive tool and sampling controls from capability flags by @kiddyt00
- #411 — feat(providers): cache public catalog syncs behind a freshness window by @kiddyt00
- #423 — feat(pricing): add provider schedules and linked model prices by @astaxie
- #421 — fix(routing): gate shared controls on adapter forwarding by @kiddyt00
- #410 — fix(responses): keep image continuations on one upstream by @deepjerry-ai
- #429 — fix(billing): retain existing Redis concurrency leases by @astaxie
- #430 — fix(embeddings): accept ragflow drop_params hint by @astaxie
- #431 — fix(admin): bound provider monitoring memory and decouple loading by @astaxie
- #420 — fix(routing): surface aggregated Jev admission reasons by @kiddyt00
- #432 — fix(server): distinguish client cancellation from gateway failures by @mvanhorn
Thanks to @astaxie, @deepjerry-ai, @wozhenbang2004, @tangsong404, @kiddyt00, and @mvanhorn for this release. Welcome to first-time contributors @wozhenbang2004, @tangsong404, @kiddyt00, and @mvanhorn.
All 135 commits since v0.10.0 (including merges and release preparation)
55f0436dbfeat(catalog): refresh model offers and lifecycle boundariesab2038798merge: sync model updates with Jev compatibility changes3cdfd16cbMerge remote-tracking branch 'origin/main' into codex/model-updates-20261016d8d0a49f1fix(catalog): preserve imported output token limits840c18521feat(providers): integrate magpie subscription accountsafdb06dd9ci(backend): shard the complete server test suite7338ef777fix(providers): harden subscription account boundaries752da0e78fix(providers): protect subscription errors and usagea34cece12fix(providers): preserve subscription request semantics61b8ce479fix(providers): correct subscription routing and accountingf4645a0acfix(providers): preserve cancellation across lease rollback9fe770291feat(subscriptions): complete magpie account coveragef684adc10fix(providers): correct quota and subscription failure handling428c6c395fix(providers): preserve subscription stream and recovery semanticsd6fe3e7e5fix(providers): repair subscription reauthorization and errorsbd53e32a4Merge pull request #389 from astaxie/codex/model-updates-202610165d85fe83bmerge: sync subscription account support with mainf6987bb43fix(providers): preserve subscription account identity and errors331f2aba7fix(providers): guard subscription account observationsaa937d261fix(providers): isolate replaced account state and cancel failed sign-insa5471e7f0fix(providers): guard refresh completion and subscription requests9f975acc6fix(providers): preserve subscription errors and account capabilitiesd4d0a5498fix(providers): guard subscription streams and session persistence7979f01e3fix(providers): ignore standalone subscription SSE extensions46b399ca1fix(providers): isolate subscription observations and stream failures5db0ca298fix(providers): bind subscription credentials and preserve responses4a804b66ffix(providers): protect refresh snapshots and egress failures1b7c7f3d6fix(providers): enforce credential and Claude request boundariesba9e7a609fix(auth): adapt login layout to smaller screens564c1b313Merge remote-tracking branch 'origin/main' into codex/fix-login-responsive9c1b1f8fefix(providers): correct WorkBuddy browser authorization handoff1f9f74960fix(providers): preserve WorkBuddy account domain metadata0771d240ctest(providers): normalize WorkBuddy header assertions10973a062test(usage): await canceled query connection cleanup24c8f96effeat(providers): support bulk model selection9635c0e37fix(providers): collect WorkBuddy streaming chat responses32ed54804Merge pull request #403 from astaxie/codex/fix-login-responsive59575b3c0Merge remote-tracking branch 'origin/main' into codex/subscription-account-support7a972bbf0feat(models): import provider models with one-to-one routes46338cd2ffix(models): align model creation and provider import actionsa2216c252fix(models): explain and focus provider import requirementsf86311d85fix(models): show explicit feedback for blocked imports20e0e60d2fix(models): close provider import after successae112b40bfeat(providers): add subscription account brand icons406847dedfix(providers): preserve subscription probe response text952541034fix(providers): simplify subscription account authorizationbe61c4363fix(providers): report Google subscription region restrictionsc6b1802adfix(providers): distinguish OAuth code rejection and restore retry32049d4e2fix(providers): request Grok inference authorization scopee13ce33c8fix(providers): receive local ChatGPT authorization callbacks38867bbc6fix(providers): await Claude authorization slot cleanupf30cf9f06fix(providers): retain ChatGPT client registration across sign-ins31cae573dfix(subscriptions): preserve account state and inference controlsa63035b3dfix(subscriptions): preserve account state and bound response collectionb85ade519fix(subscriptions): preserve native token rotations on cancellation7ce2d9dc3feat(subscriptions): make expired accounts easy to sign in againe14f1cee5fix(subscriptions): harden reauthorization and upstream failures76d4b3eecfix(subscriptions): bound worker failures and preserve routing3dd65f1d5fix(subscriptions): reject Google inference redirects88a02816bfix(subscriptions): drain credential persistence before shutdowna283452c9fix(subscriptions): preserve Copilot limits and selection failures0c185becafix(subscriptions): preserve Google metadata egress failures9e8323ca6fix(subscriptions): retain ChatGPT reasoning capabilitiescbce25533fix(subscriptions): declare supported routing parameters21d0f4bf7fix(subscriptions): preserve reasoning defaults and retry delaysb10a387f1fix(subscriptions): renew Grok credential revisions safelyfd5b6c143fix(subscriptions): drain native token refreshes on shutdowndd6c7a6b4Merge pull request #402 from astaxie/codex/subscription-account-support4852bb4d2fix(anthropic): accept system messages without legacy betaf12893017docs: clarify system-message admission supportf5b962954docs(ja): clarify system-message admission support8e91601e0docs(zh-CN): clarify system-message admission support54a23d3cdMerge pull request #408 from wozhenbang2004/fix/anthropic-system-without-beta2a467fb7fdocs(contributors): refresh contributor lists945f202b8fix(responses): keep image continuations on one upstream0e6614241fix(db): expect schema version 11 after image-store migration51c81b6f8fix(responses): forward only new items on image continuations0ca2c5d08fix(responses): raise subscription replay limits and add zstd1e7d87e97fix(responses): match stored assistant items and bound zstd errors5e2ac7858feat(providers): cache public catalog syncs behind a freshness window00adc19eeperf(catalog): memoize model category definition normalization3c9f13839feat(console): decouple catalog reload from upstream sync4c534e9fddocs(deployment): document provider catalog sync configuratione73713baechore(console): revert incidental next-env.d.ts build rewrited5be545dedocs(console): add provider catalog sync button screenshotd5a91a4acperf(console): stop rebuilding model category definitions per lookupfab701e0fstyle(server): gofmt provider catalog sync test imports29d5d6ee3chore(deploy): register provider catalog variables in start.sh28cd69f4ffix(guardrails): validate birth dates with single-digit month or dayec0f18d45test(guardrails): use English impossible-date case names14b462fa1Merge pull request #385 from tangsong500/fix/guardrail-birth-date-single-digit5cd672e8edocs(contributors): refresh contributor listsbad4eae79Merge pull request #413 from kiddyt00/fix/model-directory-nav-lag6bd1318bbMerge remote-tracking branch 'upstream/main' into feat/provider-catalog-syncac8ef75e7fix(provider-catalog): honor disabled sync settings and refresh the catalog in place3de007ea0test(provider-catalog): check environment restore errors in the unset test4673828dedocs(console): refresh provider catalog sync screenshots4c56bf2c2fix(provider-catalog): serialize fresh snapshot merges under the cluster lease6733a4a3afix(provider-catalog): force the scheduled sync past the freshness windowbc8c02b0efix(console): propagate a failed catalog reload to the sync buttonf71951559test(console): fix the payload module path in the catalog sync wiring test1d8128d39fix(catalog): derive tool and sampling controls from capability flagseefc82dfffeat(pricing): add provider schedules and linked model pricesdf208355afix(pricing): bound source resolution and preserve recovery3d4db7ce6fix(pricing): normalize saved schedule fields in the editor04a5227e1fix(pricing): enforce linked rates and preserve editor intent0b57c7134fix(pricing): isolate evidence and retain schedule identityf96316c90fix(pricing): reject incomplete schedule clocks60bc7b23ffix(pricing): preserve drafts across inventory refreshesbbaa6e89dfix(routing): gate shared controls on adapter forwarding429306349Merge pull request #422 from kiddyt00/fix/catalog-parameter-derivation266e01e5eMerge pull request #411 from kiddyt00/feat/provider-catalog-syncbd4ed7632Merge pull request #423 from astaxie/codex/issue-419-provider-pricing1df845d30fix(routing): resolve forwarding capability from the effective adapter9cb53b17efix(responses): publish image bindings only after approvalab35be432fix(responses): drop unused image candidate assignmentb625afb4cfix(responses): read old boundaries and raise ingress71166184dMerge pull request #421 from kiddyt00/fix/jev-endpoint-neutral-controls606c9cc26docs(contributors): refresh contributor listsa3eaee59eMerge pull request #410 from astaxie/fix/responses-image-store86ed73a8cfix(routing): surface aggregated Jev admission reasons3ca916c66fix(billing): retain existing Redis concurrency leases96d221458fix(embeddings): accept ragflow drop_params hint4c530b4a7fix(admin): bound provider monitoring memory and decouple loadingb499a8e7fMerge pull request #429 from astaxie/codex/fix-redis-billing-lease-426b18949ae1Merge pull request #430 from astaxie/codex/fix-ragflow-embedding-428d8b1d9d5adocs(contributors): refresh contributor lists05d742ea5Merge pull request #431 from astaxie/codex/fix-provider-monitoring-42589f1ae1f1Merge pull request #420 from kiddyt00/fix/jev-admission-detailsde944e7c5fix(server): distinguish client cancellation from gateway failures82e6f5cf3Merge pull request #432 from mvanhorn/fix/299-tokenhub-client-cancellation-outcomesf94d02532docs(contributors): refresh contributor lists5f41ab36bchore(release): prepare v0.11.066b75ef4bfix(build): include subscription inventory in frontend image0e627e5d6test(deploy): validate the actual frontend image build
Full Changelog: v0.10.0...v0.11.0