Skip to content

TokenHub v0.11.0

Latest

Choose a tag to compare

@astaxie astaxie released this 16 Nov 05:49
· 11 commits to main since this release

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, and seed from 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_unavailable before 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/responses ingress 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 system messages 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_params embedding hints; null is 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, and prompt_cache_retention without 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 node on PATH. Claude Code additionally requires a genuine installed claude CLI, 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:true by default, with approximately 30-day retention. Set provider/resource responses_store=off to disable this; other providers require responses_store=on to opt in. ChatGPT/Codex subscription routes retain store:false, discard previous_response_id, and do not acquire stored-response continuations. Optional compression uses responses_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. Raise TOKENHUB_NGINX_CLIENT_MAX_BODY_SIZE when larger image transcripts are required. Helm ingress defaults to 128m; other upstream routes and mixed-provider failover retain the configured multimodal forward limit, normally 32 MiB.
  • Catalog configuration: TOKENHUB_PROVIDER_CATALOG_UPSTREAM_URL selects a mirror; an explicit empty value disables external fetching. TOKENHUB_PROVIDER_CATALOG_SYNC_INTERVAL_SECONDS defaults to 86400; 0 disables 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.11 and latest.
  • Native Linux bundles: tokenhub_0.11.0_linux_amd64.tar.gz and tokenhub_0.11.0_linux_arm64.tar.gz, with checksums.txt attached 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)
  • 55f0436db feat(catalog): refresh model offers and lifecycle boundaries
  • ab2038798 merge: sync model updates with Jev compatibility changes
  • 3cdfd16cb Merge remote-tracking branch 'origin/main' into codex/model-updates-20261016
  • d8d0a49f1 fix(catalog): preserve imported output token limits
  • 840c18521 feat(providers): integrate magpie subscription accounts
  • afdb06dd9 ci(backend): shard the complete server test suite
  • 7338ef777 fix(providers): harden subscription account boundaries
  • 752da0e78 fix(providers): protect subscription errors and usage
  • a34cece12 fix(providers): preserve subscription request semantics
  • 61b8ce479 fix(providers): correct subscription routing and accounting
  • f4645a0ac fix(providers): preserve cancellation across lease rollback
  • 9fe770291 feat(subscriptions): complete magpie account coverage
  • f684adc10 fix(providers): correct quota and subscription failure handling
  • 428c6c395 fix(providers): preserve subscription stream and recovery semantics
  • d6fe3e7e5 fix(providers): repair subscription reauthorization and errors
  • bd53e32a4 Merge pull request #389 from astaxie/codex/model-updates-20261016
  • 5d85fe83b merge: sync subscription account support with main
  • f6987bb43 fix(providers): preserve subscription account identity and errors
  • 331f2aba7 fix(providers): guard subscription account observations
  • aa937d261 fix(providers): isolate replaced account state and cancel failed sign-ins
  • a5471e7f0 fix(providers): guard refresh completion and subscription requests
  • 9f975acc6 fix(providers): preserve subscription errors and account capabilities
  • d4d0a5498 fix(providers): guard subscription streams and session persistence
  • 7979f01e3 fix(providers): ignore standalone subscription SSE extensions
  • 46b399ca1 fix(providers): isolate subscription observations and stream failures
  • 5db0ca298 fix(providers): bind subscription credentials and preserve responses
  • 4a804b66f fix(providers): protect refresh snapshots and egress failures
  • 1b7c7f3d6 fix(providers): enforce credential and Claude request boundaries
  • ba9e7a609 fix(auth): adapt login layout to smaller screens
  • 564c1b313 Merge remote-tracking branch 'origin/main' into codex/fix-login-responsive
  • 9c1b1f8fe fix(providers): correct WorkBuddy browser authorization handoff
  • 1f9f74960 fix(providers): preserve WorkBuddy account domain metadata
  • 0771d240c test(providers): normalize WorkBuddy header assertions
  • 10973a062 test(usage): await canceled query connection cleanup
  • 24c8f96ef feat(providers): support bulk model selection
  • 9635c0e37 fix(providers): collect WorkBuddy streaming chat responses
  • 32ed54804 Merge pull request #403 from astaxie/codex/fix-login-responsive
  • 59575b3c0 Merge remote-tracking branch 'origin/main' into codex/subscription-account-support
  • 7a972bbf0 feat(models): import provider models with one-to-one routes
  • 46338cd2f fix(models): align model creation and provider import actions
  • a2216c252 fix(models): explain and focus provider import requirements
  • f86311d85 fix(models): show explicit feedback for blocked imports
  • 20e0e60d2 fix(models): close provider import after success
  • ae112b40b feat(providers): add subscription account brand icons
  • 406847ded fix(providers): preserve subscription probe response text
  • 952541034 fix(providers): simplify subscription account authorization
  • be61c4363 fix(providers): report Google subscription region restrictions
  • c6b1802ad fix(providers): distinguish OAuth code rejection and restore retry
  • 32049d4e2 fix(providers): request Grok inference authorization scope
  • e13ce33c8 fix(providers): receive local ChatGPT authorization callbacks
  • 38867bbc6 fix(providers): await Claude authorization slot cleanup
  • f30cf9f06 fix(providers): retain ChatGPT client registration across sign-ins
  • 31cae573d fix(subscriptions): preserve account state and inference controls
  • a63035b3d fix(subscriptions): preserve account state and bound response collection
  • b85ade519 fix(subscriptions): preserve native token rotations on cancellation
  • 7ce2d9dc3 feat(subscriptions): make expired accounts easy to sign in again
  • e14f1cee5 fix(subscriptions): harden reauthorization and upstream failures
  • 76d4b3eec fix(subscriptions): bound worker failures and preserve routing
  • 3dd65f1d5 fix(subscriptions): reject Google inference redirects
  • 88a02816b fix(subscriptions): drain credential persistence before shutdown
  • a283452c9 fix(subscriptions): preserve Copilot limits and selection failures
  • 0c185beca fix(subscriptions): preserve Google metadata egress failures
  • 9e8323ca6 fix(subscriptions): retain ChatGPT reasoning capabilities
  • cbce25533 fix(subscriptions): declare supported routing parameters
  • 21d0f4bf7 fix(subscriptions): preserve reasoning defaults and retry delays
  • b10a387f1 fix(subscriptions): renew Grok credential revisions safely
  • fd5b6c143 fix(subscriptions): drain native token refreshes on shutdown
  • dd6c7a6b4 Merge pull request #402 from astaxie/codex/subscription-account-support
  • 4852bb4d2 fix(anthropic): accept system messages without legacy beta
  • f12893017 docs: clarify system-message admission support
  • f5b962954 docs(ja): clarify system-message admission support
  • 8e91601e0 docs(zh-CN): clarify system-message admission support
  • 54a23d3cd Merge pull request #408 from wozhenbang2004/fix/anthropic-system-without-beta
  • 2a467fb7f docs(contributors): refresh contributor lists
  • 945f202b8 fix(responses): keep image continuations on one upstream
  • 0e6614241 fix(db): expect schema version 11 after image-store migration
  • 51c81b6f8 fix(responses): forward only new items on image continuations
  • 0ca2c5d08 fix(responses): raise subscription replay limits and add zstd
  • 1e7d87e97 fix(responses): match stored assistant items and bound zstd errors
  • 5e2ac7858 feat(providers): cache public catalog syncs behind a freshness window
  • 00adc19ee perf(catalog): memoize model category definition normalization
  • 3c9f13839 feat(console): decouple catalog reload from upstream sync
  • 4c534e9fd docs(deployment): document provider catalog sync configuration
  • e73713bae chore(console): revert incidental next-env.d.ts build rewrite
  • d5be545de docs(console): add provider catalog sync button screenshot
  • d5a91a4ac perf(console): stop rebuilding model category definitions per lookup
  • fab701e0f style(server): gofmt provider catalog sync test imports
  • 29d5d6ee3 chore(deploy): register provider catalog variables in start.sh
  • 28cd69f4f fix(guardrails): validate birth dates with single-digit month or day
  • ec0f18d45 test(guardrails): use English impossible-date case names
  • 14b462fa1 Merge pull request #385 from tangsong500/fix/guardrail-birth-date-single-digit
  • 5cd672e8e docs(contributors): refresh contributor lists
  • bad4eae79 Merge pull request #413 from kiddyt00/fix/model-directory-nav-lag
  • 6bd1318bb Merge remote-tracking branch 'upstream/main' into feat/provider-catalog-sync
  • ac8ef75e7 fix(provider-catalog): honor disabled sync settings and refresh the catalog in place
  • 3de007ea0 test(provider-catalog): check environment restore errors in the unset test
  • 4673828de docs(console): refresh provider catalog sync screenshots
  • 4c56bf2c2 fix(provider-catalog): serialize fresh snapshot merges under the cluster lease
  • 6733a4a3a fix(provider-catalog): force the scheduled sync past the freshness window
  • bc8c02b0e fix(console): propagate a failed catalog reload to the sync button
  • f71951559 test(console): fix the payload module path in the catalog sync wiring test
  • 1d8128d39 fix(catalog): derive tool and sampling controls from capability flags
  • eefc82dff feat(pricing): add provider schedules and linked model prices
  • df208355a fix(pricing): bound source resolution and preserve recovery
  • 3d4db7ce6 fix(pricing): normalize saved schedule fields in the editor
  • 04a5227e1 fix(pricing): enforce linked rates and preserve editor intent
  • 0b57c7134 fix(pricing): isolate evidence and retain schedule identity
  • f96316c90 fix(pricing): reject incomplete schedule clocks
  • 60bc7b23f fix(pricing): preserve drafts across inventory refreshes
  • bbaa6e89d fix(routing): gate shared controls on adapter forwarding
  • 429306349 Merge pull request #422 from kiddyt00/fix/catalog-parameter-derivation
  • 266e01e5e Merge pull request #411 from kiddyt00/feat/provider-catalog-sync
  • bd4ed7632 Merge pull request #423 from astaxie/codex/issue-419-provider-pricing
  • 1df845d30 fix(routing): resolve forwarding capability from the effective adapter
  • 9cb53b17e fix(responses): publish image bindings only after approval
  • ab35be432 fix(responses): drop unused image candidate assignment
  • b625afb4c fix(responses): read old boundaries and raise ingress
  • 71166184d Merge pull request #421 from kiddyt00/fix/jev-endpoint-neutral-controls
  • 606c9cc26 docs(contributors): refresh contributor lists
  • a3eaee59e Merge pull request #410 from astaxie/fix/responses-image-store
  • 86ed73a8c fix(routing): surface aggregated Jev admission reasons
  • 3ca916c66 fix(billing): retain existing Redis concurrency leases
  • 96d221458 fix(embeddings): accept ragflow drop_params hint
  • 4c530b4a7 fix(admin): bound provider monitoring memory and decouple loading
  • b499a8e7f Merge pull request #429 from astaxie/codex/fix-redis-billing-lease-426
  • b18949ae1 Merge pull request #430 from astaxie/codex/fix-ragflow-embedding-428
  • d8b1d9d5a docs(contributors): refresh contributor lists
  • 05d742ea5 Merge pull request #431 from astaxie/codex/fix-provider-monitoring-425
  • 89f1ae1f1 Merge pull request #420 from kiddyt00/fix/jev-admission-details
  • de944e7c5 fix(server): distinguish client cancellation from gateway failures
  • 82e6f5cf3 Merge pull request #432 from mvanhorn/fix/299-tokenhub-client-cancellation-outcomes
  • f94d02532 docs(contributors): refresh contributor lists
  • 5f41ab36b chore(release): prepare v0.11.0
  • 66b75ef4b fix(build): include subscription inventory in frontend image
  • 0e627e5d6 test(deploy): validate the actual frontend image build

Full Changelog: v0.10.0...v0.11.0