cartethyia 2.5.10 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +8 -0
- package/dist/dashboard/assets/{BannedPage-Cd30Z0b9.js → BannedPage-l6XMnfr9.js} +1 -1
- package/dist/dashboard/assets/BannedPage-l6XMnfr9.js.gz +0 -0
- package/dist/dashboard/assets/{CliToolDetailPage-wf5u-ww6.js → CliToolDetailPage-DwOzAW45.js} +1 -1
- package/dist/dashboard/assets/CliToolDetailPage-DwOzAW45.js.gz +0 -0
- package/dist/dashboard/assets/{CliToolsPage-DykPvuck.js → CliToolsPage-BT3Up3QA.js} +1 -1
- package/dist/dashboard/assets/CliToolsPage-BT3Up3QA.js.gz +0 -0
- package/dist/dashboard/assets/{CombosPage-DwvSD3vs.js → CombosPage-6kYIUpzR.js} +1 -1
- package/dist/dashboard/assets/CombosPage-6kYIUpzR.js.gz +0 -0
- package/dist/dashboard/assets/{ConsoleLogPage-CIr7KDex.js → ConsoleLogPage-zRnj1mlR.js} +1 -1
- package/dist/dashboard/assets/ConsoleLogPage-zRnj1mlR.js.gz +0 -0
- package/dist/dashboard/assets/{CustomizationPage-82X0DDdH.js → CustomizationPage-C7m-H1Rz.js} +1 -1
- package/dist/dashboard/assets/CustomizationPage-C7m-H1Rz.js.gz +0 -0
- package/dist/dashboard/assets/HealthEventsModal-C8MR_BdB.js +1 -0
- package/dist/dashboard/assets/HealthEventsModal-C8MR_BdB.js.gz +0 -0
- package/dist/dashboard/assets/{LoginPage-CS5mPuVF.js → LoginPage-CbphLvjg.js} +1 -1
- package/dist/dashboard/assets/LoginPage-CbphLvjg.js.gz +0 -0
- package/dist/dashboard/assets/{ModelPicker-C0UCUsVJ.js → ModelPicker-DVny4S5_.js} +1 -1
- package/dist/dashboard/assets/ModelPicker-DVny4S5_.js.gz +0 -0
- package/dist/dashboard/assets/OverviewPage-DABu2Wgt.js +1 -0
- package/dist/dashboard/assets/OverviewPage-DABu2Wgt.js.gz +0 -0
- package/dist/dashboard/assets/ProviderDetailPage-C15x9q13.js +3 -0
- package/dist/dashboard/assets/ProviderDetailPage-C15x9q13.js.gz +0 -0
- package/dist/dashboard/assets/{ProvidersPage-vdja5ZPK.js → ProvidersPage-Dfb2896L.js} +1 -1
- package/dist/dashboard/assets/ProvidersPage-Dfb2896L.js.gz +0 -0
- package/dist/dashboard/assets/{ProxyPage-BB4CNm4-.js → ProxyPage-BaCIdAUt.js} +1 -1
- package/dist/dashboard/assets/ProxyPage-BaCIdAUt.js.gz +0 -0
- package/dist/dashboard/assets/QuotaPage-BsdoCIw1.js +1 -0
- package/dist/dashboard/assets/QuotaPage-BsdoCIw1.js.gz +0 -0
- package/dist/dashboard/assets/SettingsPage-KVJFh3Ip.js +1 -0
- package/dist/dashboard/assets/SettingsPage-KVJFh3Ip.js.gz +0 -0
- package/dist/dashboard/assets/{SetupPage-FadUOl9S.js → SetupPage-D4g6vOGc.js} +1 -1
- package/dist/dashboard/assets/SetupPage-D4g6vOGc.js.gz +0 -0
- package/dist/dashboard/assets/{SortableList-Cfy6_Khv.js → SortableList-C93i14BD.js} +1 -1
- package/dist/dashboard/assets/SortableList-C93i14BD.js.gz +0 -0
- package/dist/dashboard/assets/{StudioPage-CM92fgJf.js → StudioPage-SgQpymjm.js} +1 -1
- package/dist/dashboard/assets/{StudioPage-CM92fgJf.js.gz → StudioPage-SgQpymjm.js.gz} +0 -0
- package/dist/dashboard/assets/{UsagePage-BT4MyQeT.js → UsagePage-BFME-eba.js} +2 -2
- package/dist/dashboard/assets/UsagePage-BFME-eba.js.gz +0 -0
- package/dist/dashboard/assets/{api-keys-DQYLQxpW.js → api-keys-C23S9sgp.js} +1 -1
- package/dist/dashboard/assets/api-keys-C23S9sgp.js.gz +0 -0
- package/dist/dashboard/assets/{app-B7pVRhJ1.js → app-2KhtHCv9.js} +1 -1
- package/dist/dashboard/assets/{app-B7pVRhJ1.js.gz → app-2KhtHCv9.js.gz} +0 -0
- package/dist/dashboard/assets/app-CEeaMHOy.css +2 -0
- package/dist/dashboard/assets/app-CEeaMHOy.css.gz +0 -0
- package/dist/dashboard/assets/{assert-C9FD_JwJ.js → assert-DU6qrMA_.js} +1 -1
- package/dist/dashboard/assets/assert-DU6qrMA_.js.gz +0 -0
- package/dist/dashboard/assets/{badge-Bvyr7D0u.js → badge-CKsF123d.js} +1 -1
- package/dist/dashboard/assets/badge-CKsF123d.js.gz +0 -0
- package/dist/dashboard/assets/{banner-DIvKAZih.js → banner-8j7uChA9.js} +1 -1
- package/dist/dashboard/assets/banner-8j7uChA9.js.gz +0 -0
- package/dist/dashboard/assets/{card-D5_gYIS_.js → card-CdsSlWA3.js} +1 -1
- package/dist/dashboard/assets/card-CdsSlWA3.js.gz +0 -0
- package/dist/dashboard/assets/{cli-tools-CNqzrfdb.js → cli-tools-BaFUuFFF.js} +1 -1
- package/dist/dashboard/assets/cli-tools-BaFUuFFF.js.gz +0 -0
- package/dist/dashboard/assets/{clipboard-button-B6vDBtbm.js → clipboard-button-uL5aYLfW.js} +1 -1
- package/dist/dashboard/assets/clipboard-button-uL5aYLfW.js.gz +0 -0
- package/dist/dashboard/assets/{dialog-CpjrgdwJ.js → dialog-C07hr5_G.js} +1 -1
- package/dist/dashboard/assets/dialog-C07hr5_G.js.gz +0 -0
- package/dist/dashboard/assets/{drawer-BWmt3b5y.js → drawer-BPO1TcKH.js} +1 -1
- package/dist/dashboard/assets/drawer-BPO1TcKH.js.gz +0 -0
- package/dist/dashboard/assets/{entry-C_oakV3z.js → entry-Bz_CtDfC.js} +1 -1
- package/dist/dashboard/assets/entry-Bz_CtDfC.js.gz +0 -0
- package/dist/dashboard/assets/entry-CwPRKk0d.js +4 -0
- package/dist/dashboard/assets/entry-CwPRKk0d.js.gz +0 -0
- package/dist/dashboard/assets/entry-GJRbmrpA.js +1 -0
- package/dist/dashboard/assets/entry-GJRbmrpA.js.gz +0 -0
- package/dist/dashboard/assets/{github-badge-RRHHWGxh.js → github-badge-DmQreSDd.js} +1 -1
- package/dist/dashboard/assets/github-badge-DmQreSDd.js.gz +0 -0
- package/dist/dashboard/assets/{index-Bhey_rg_.js → index-Bblu6erR.js} +2 -2
- package/dist/dashboard/assets/index-Bblu6erR.js.gz +0 -0
- package/dist/dashboard/assets/{inline-C2_EQ5Uf.js → inline-C9dCYaBZ.js} +1 -1
- package/dist/dashboard/assets/inline-C9dCYaBZ.js.gz +0 -0
- package/dist/dashboard/assets/{input-BMRlQ450.js → input-CjCnXweJ.js} +1 -1
- package/dist/dashboard/assets/input-CjCnXweJ.js.gz +0 -0
- package/dist/dashboard/assets/{layout-XR5xP8ew.js → layout-V6y8DAkl.js} +1 -1
- package/dist/dashboard/assets/layout-V6y8DAkl.js.gz +0 -0
- package/dist/dashboard/assets/{list-row-Cw07dioc.js → list-row-CM1AaG_y.js} +1 -1
- package/dist/dashboard/assets/list-row-CM1AaG_y.js.gz +0 -0
- package/dist/dashboard/assets/{live-BivGfuUs.js → live-ta6GMb-8.js} +1 -1
- package/dist/dashboard/assets/live-ta6GMb-8.js.gz +0 -0
- package/dist/dashboard/assets/{model-bans-CmffjLuG.js → model-bans-BmYTmbAk.js} +1 -1
- package/dist/dashboard/assets/model-bans-BmYTmbAk.js.gz +0 -0
- package/dist/dashboard/assets/{mutation-46P0oWMe.js → mutation-g_fduiNw.js} +1 -1
- package/dist/dashboard/assets/mutation-g_fduiNw.js.gz +0 -0
- package/dist/dashboard/assets/{numbers-DrdA9oSM.js → numbers-BOevJzdz.js} +1 -1
- package/dist/dashboard/assets/numbers-BOevJzdz.js.gz +0 -0
- package/dist/dashboard/assets/{query-keys-BFhGpwR1.js → query-keys-UETqfytp.js} +1 -1
- package/dist/dashboard/assets/query-keys-UETqfytp.js.gz +0 -0
- package/dist/dashboard/assets/{routing-CAb4F37R.js → routing-BPUo-W8d.js} +1 -1
- package/dist/dashboard/assets/routing-BPUo-W8d.js.gz +0 -0
- package/dist/dashboard/assets/{select-CxVVB__N.js → select-C980c4cz.js} +1 -1
- package/dist/dashboard/assets/select-C980c4cz.js.gz +0 -0
- package/dist/dashboard/assets/{settings-DNX9sydi.js → settings--3hxSyry.js} +1 -1
- package/dist/dashboard/assets/settings--3hxSyry.js.gz +0 -0
- package/dist/dashboard/assets/{stack-uPOwM9Hs.js → stack-_gfTdLVB.js} +1 -1
- package/dist/dashboard/assets/stack-_gfTdLVB.js.gz +0 -0
- package/dist/dashboard/assets/{state-D1Yz79iL.js → state-2c5V4zo7.js} +1 -1
- package/dist/dashboard/assets/state-2c5V4zo7.js.gz +0 -0
- package/dist/dashboard/assets/{switch-sevsRrRo.js → switch-Dkke7Naf.js} +1 -1
- package/dist/dashboard/assets/switch-Dkke7Naf.js.gz +0 -0
- package/dist/dashboard/assets/{useMutation-Dem0lXQj.js → useMutation-EDFRkn1i.js} +1 -1
- package/dist/dashboard/assets/useMutation-EDFRkn1i.js.gz +0 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/dashboard/index.html.gz +0 -0
- package/dist/dashboard/precompressed-assets.json +51 -51
- package/migrations/README.md +52 -52
- package/migrations/full-postgres/0020_add_telemetry_event_analytics.sql +77 -0
- package/migrations/full-postgres/0021_add_api_key_concurrency_tolerance.sql +13 -0
- package/migrations/full-postgres/0022_add_inferhub_config_key.sql +17 -0
- package/migrations/full-postgres/0023_drop_api_key_concurrency_tolerance.sql +13 -0
- package/migrations/lite-sqlite3/0020_add_telemetry_event_analytics.sql +69 -0
- package/migrations/lite-sqlite3/0021_add_api_key_concurrency_tolerance.sql +13 -0
- package/migrations/lite-sqlite3/0022_add_inferhub_config_key.sql +17 -0
- package/migrations/lite-sqlite3/0023_drop_api_key_concurrency_tolerance.sql +13 -0
- package/package.json +96 -95
- package/scripts/cli/admin.ts +126 -128
- package/scripts/cli/autostart.ts +237 -237
- package/scripts/cli/background.ts +120 -110
- package/scripts/cli/bin/carte.cjs +8 -8
- package/scripts/cli/bin/cartethyia.cjs +167 -167
- package/scripts/cli/console-menu.ts +39 -30
- package/scripts/cli/controller.ts +145 -0
- package/scripts/cli/env.ts +99 -99
- package/scripts/cli/gateway.ts +264 -260
- package/scripts/cli/instance.ts +234 -224
- package/scripts/cli/main.ts +188 -167
- package/scripts/cli/platform.ts +64 -64
- package/scripts/cli/prompt.ts +217 -79
- package/scripts/cli/services.ts +88 -88
- package/scripts/cli/setup.ts +445 -445
- package/scripts/cli/start.ts +85 -85
- package/scripts/cli/startup-signal.ts +23 -23
- package/scripts/cli/telemetry.ts +70 -0
- package/scripts/cli/tray/index.ts +263 -263
- package/scripts/cli/tray/windows.ps1 +107 -107
- package/scripts/cli/tray.ts +29 -4
- package/scripts/cli/update.ts +39 -39
- package/scripts/cli/version.ts +67 -67
- package/scripts/cli/wordmark.ts +58 -58
- package/src/boot/app.ts +16 -1
- package/src/boot/dependencies.ts +128 -25
- package/src/config/resources.ts +137 -0
- package/src/config/runtime.ts +133 -76
- package/src/config/spec.ts +30 -29
- package/src/config/telemetry.ts +0 -25
- package/src/console/api-keys/bucket-spend.ts +14 -17
- package/src/console/api-keys/contracts.ts +410 -410
- package/src/console/api-keys/routes.ts +12 -0
- package/src/console/audit/store.ts +2 -3
- package/src/console/auth/setup-service.ts +8 -1
- package/src/console/backup/routes.ts +7 -0
- package/src/console/backup/service.ts +463 -463
- package/src/console/backup/store.ts +16 -11
- package/src/console/backup/validate.ts +1 -4
- package/src/console/cli-tools/fs-ops.ts +18 -2
- package/src/console/data-management/contracts.ts +1 -8
- package/src/console/data-management/operations.ts +61 -48
- package/src/console/data-management/routes.ts +4 -2
- package/src/console/domain-registration.ts +25 -3
- package/src/console/inferhub/client.ts +139 -0
- package/src/console/inferhub/key-store.ts +129 -0
- package/src/console/inferhub/normalize.ts +347 -0
- package/src/console/inferhub/routes.ts +411 -0
- package/src/console/inferhub/store.ts +109 -0
- package/src/console/inferhub/types.ts +183 -0
- package/src/console/observability/contracts.ts +2 -41
- package/src/console/observability/store.ts +176 -371
- package/src/console/providers/catalog/public-model-store.ts +0 -0
- package/src/console/providers/catalog/store.ts +23 -36
- package/src/console/quota/account-quota-shared.ts +52 -52
- package/src/console/quota/account-quota-tenant.ts +16 -24
- package/src/console/quota/refresh.ts +441 -441
- package/src/console/routing/pools/import-parse.ts +206 -206
- package/src/console/routing/pools/operations.ts +543 -543
- package/src/console/routing/pools/probe-verdict.ts +132 -132
- package/src/console/routing/pools/routes.ts +181 -181
- package/src/console/settings/contracts.ts +42 -40
- package/src/console/settings/store.ts +25 -25
- package/src/console/share/share-stats.ts +22 -4
- package/src/console/share/share-usage.ts +30 -4
- package/src/console/shared/cursor.ts +15 -0
- package/src/console/updates/routes.ts +12 -0
- package/src/main.ts +13 -5
- package/src/network/pool/resolver.ts +1104 -1104
- package/src/observability/client-name.ts +22 -0
- package/src/observability/event-log.ts +5 -29
- package/src/observability/event-query.ts +690 -0
- package/src/observability/log-ring.ts +26 -2
- package/src/observability/log-sanitize.ts +118 -0
- package/src/observability/logger.ts +17 -13
- package/src/observability/metrics.ts +35 -0
- package/src/observability/payload-capture.ts +114 -41
- package/src/observability/payload-store.ts +249 -24
- package/src/observability/raw-event-writer.ts +118 -0
- package/src/observability/runtime-metrics.ts +71 -1
- package/src/observability/telemetry-buffer.ts +100 -17
- package/src/observability/telemetry-reconciliation.ts +417 -0
- package/src/persistence/boot.ts +20 -9
- package/src/persistence/db-pg.ts +13 -0
- package/src/persistence/db-sqlite.ts +569 -497
- package/src/persistence/dialect.ts +3 -2
- package/src/persistence/migrate.ts +181 -181
- package/src/persistence/schema.ts +1496 -1406
- package/src/persistence/shared-cache.ts +5 -1
- package/src/persistence/stores/api-key-store.ts +581 -581
- package/src/persistence/stores/telemetry-store.ts +124 -63
- package/src/protocol/reasoning-text.ts +30 -0
- package/src/protocol/response/chat.ts +33 -7
- package/src/protocol/response/codex.ts +14 -2
- package/src/protocol/response/messages.ts +5 -2
- package/src/providers/authentication/oauth-flow-store.ts +3 -10
- package/src/providers/bundled-discovery-providers.ts +122 -122
- package/src/providers/default-registry.ts +10 -0
- package/src/providers/discovery/catalog/catalog-blob.ts +18 -18
- package/src/providers/discovery/models-dev-catalog.ts +354 -354
- package/src/providers/discovery/probe-phases.ts +43 -7
- package/src/providers/discovery/probing-service.ts +70 -32
- package/src/providers/integrations/antigravity/antigravity.ts +9 -2
- package/src/providers/integrations/buddy/buddy-catalog-shared.ts +85 -17
- package/src/providers/integrations/buddy/buddy-chat-shared.ts +934 -934
- package/src/providers/integrations/buddy/buddy-checkin.ts +5 -9
- package/src/providers/integrations/buddy/buddy-discovery-shared.ts +3 -7
- package/src/providers/integrations/buddy/buddy-quota-shared.ts +3 -1
- package/src/providers/integrations/buddy/codebuddy/cn-provider.ts +57 -49
- package/src/providers/integrations/buddy/codebuddy/provider.ts +180 -180
- package/src/providers/integrations/buddy/workbuddy/provider.ts +206 -206
- package/src/providers/integrations/buddy/workbuddy/quota.ts +161 -161
- package/src/providers/integrations/claude/claude-quota.ts +2 -2
- package/src/providers/integrations/claude/claude-user-profiles.ts +3 -2
- package/src/providers/integrations/claude/claude.ts +3 -4
- package/src/providers/integrations/cline/cline.ts +94 -8
- package/src/providers/integrations/codex/codex.ts +61 -37
- package/src/providers/integrations/cursor/cursor-catalog.ts +368 -368
- package/src/providers/integrations/cursor/cursor-http2.ts +300 -300
- package/src/providers/integrations/cursor/cursor-identity.ts +2 -4
- package/src/providers/integrations/cursor/cursor-request.ts +11 -0
- package/src/providers/integrations/cursor/cursor.ts +29 -17
- package/src/providers/integrations/cursor/protocol/framing.ts +129 -129
- package/src/providers/integrations/cursor/protocol/messages.ts +2380 -2380
- package/src/providers/integrations/cursor/protocol/struct.ts +305 -305
- package/src/providers/integrations/cursor/protocol/tool-canonical.ts +275 -0
- package/src/providers/integrations/grok/grok-quota.ts +279 -279
- package/src/providers/integrations/grok/grok-ratelimit-store.ts +73 -73
- package/src/providers/integrations/grok/grok-ratelimit.ts +218 -218
- package/src/providers/integrations/hermes.ts +7 -1
- package/src/providers/integrations/inferhub.ts +201 -73
- package/src/providers/integrations/kilo/kilo.ts +152 -152
- package/src/providers/integrations/kiro/kiro-machine-id.ts +2 -4
- package/src/providers/integrations/openrouter/provider.ts +129 -129
- package/src/providers/integrations/qoder/qoder-quota.ts +193 -192
- package/src/providers/integrations/qoder/qoder-realm.ts +106 -106
- package/src/providers/integrations/trae/trae-oauth.ts +4 -26
- package/src/providers/integrations/trae/trae-quota.ts +389 -384
- package/src/providers/integrations/trae/trae-realm.ts +15 -2
- package/src/providers/integrations/xiaomi-mimo/think-stream.ts +100 -24
- package/src/providers/integrations/zcode/oauth.ts +1 -1
- package/src/providers/operations/account-health-service.ts +605 -279
- package/src/providers/provider-metadata.ts +12 -1
- package/src/providers/provider-model-definition.ts +373 -373
- package/src/providers/quota/quota-contracts.ts +3 -7
- package/src/providers/search/search-provider.ts +2 -6
- package/src/security/admission/contracts.ts +10 -0
- package/src/security/admission/in-memory-store.ts +89 -14
- package/src/security/admission/lua.ts +191 -182
- package/src/security/admission/redis-store.ts +30 -0
- package/src/security/admission/service.ts +18 -0
- package/src/security/api-key-auth-cache.ts +96 -0
- package/src/security/api-key-auth.ts +11 -100
- package/src/security/client-router-fingerprint.ts +3 -7
- package/src/security/ip-boundary.ts +7 -3
- package/src/shared/coerce.ts +67 -0
- package/src/shared/hash.ts +6 -0
- package/src/shared/time.ts +7 -0
- package/src/transport/dispatch/attempt-finalize.ts +26 -138
- package/src/transport/dispatch/attempt-loop.ts +103 -81
- package/src/transport/dispatch/capture-policy.ts +78 -0
- package/src/transport/dispatch/proxy-request.ts +4 -2
- package/src/transport/dispatch/streaming/encoder.ts +111 -5
- package/src/transport/dispatch/streaming/stream.ts +19 -2
- package/src/transport/dispatch/streaming/thinking-loop.ts +300 -0
- package/src/transport/failure-policy.ts +27 -0
- package/src/transport/guards/abuse-guard.ts +2 -2
- package/src/transport/guards/auth-guard.ts +17 -0
- package/src/transport/guards/body-policy.ts +3 -2
- package/src/transport/guards/concurrency-guard.ts +89 -13
- package/src/transport/guards/early-rejection-capture.ts +43 -3
- package/src/transport/guards/error-lifecycle.ts +10 -2
- package/src/transport/guards/guard-errors.ts +23 -0
- package/src/transport/guards/headroom-guard.ts +41 -7
- package/src/transport/guards/pipeline.ts +24 -0
- package/src/transport/guards/request-context.ts +2 -1
- package/src/transport/routing/admission.ts +51 -9
- package/src/transport/routing/bounded-lru.ts +49 -0
- package/src/transport/routing/candidate-index.ts +88 -0
- package/src/transport/routing/reservations.ts +121 -7
- package/src/transport/routing/round-robin.ts +10 -22
- package/src/transport/routing/route-catalog.ts +26 -13
- package/src/transport/routing/route-model.ts +22 -2
- package/src/transport/routing/router.ts +53 -31
- package/src/transport/surface/chat/encode.ts +2 -3
- package/src/transport/surface/chat/parse.ts +2 -1
- package/src/transport/surface/dialects.ts +11 -3
- package/src/transport/surface/messages/encode.ts +2 -1
- package/src/transport/surface/messages/parse.ts +3 -1
- package/src/transport/surface/messages/stream.ts +2 -6
- package/src/workers/maintenance-lease.ts +200 -0
- package/src/workers/scheduler.ts +101 -1
- package/dist/dashboard/assets/BannedPage-Cd30Z0b9.js.gz +0 -0
- package/dist/dashboard/assets/CliToolDetailPage-wf5u-ww6.js.gz +0 -0
- package/dist/dashboard/assets/CliToolsPage-DykPvuck.js.gz +0 -0
- package/dist/dashboard/assets/CombosPage-DwvSD3vs.js.gz +0 -0
- package/dist/dashboard/assets/ConsoleLogPage-CIr7KDex.js.gz +0 -0
- package/dist/dashboard/assets/CustomizationPage-82X0DDdH.js.gz +0 -0
- package/dist/dashboard/assets/HealthEventsModal-BYPucTTn.js +0 -1
- package/dist/dashboard/assets/HealthEventsModal-BYPucTTn.js.gz +0 -0
- package/dist/dashboard/assets/LoginPage-CS5mPuVF.js.gz +0 -0
- package/dist/dashboard/assets/ModelPicker-C0UCUsVJ.js.gz +0 -0
- package/dist/dashboard/assets/OverviewPage-Dk_ew3YU.js +0 -1
- package/dist/dashboard/assets/OverviewPage-Dk_ew3YU.js.gz +0 -0
- package/dist/dashboard/assets/ProviderDetailPage-CAiRn2Q0.js +0 -3
- package/dist/dashboard/assets/ProviderDetailPage-CAiRn2Q0.js.gz +0 -0
- package/dist/dashboard/assets/ProvidersPage-vdja5ZPK.js.gz +0 -0
- package/dist/dashboard/assets/ProxyPage-BB4CNm4-.js.gz +0 -0
- package/dist/dashboard/assets/QuotaPage-FEc4iNyq.js +0 -1
- package/dist/dashboard/assets/QuotaPage-FEc4iNyq.js.gz +0 -0
- package/dist/dashboard/assets/SettingsPage-Dlfi5L4N.js +0 -1
- package/dist/dashboard/assets/SettingsPage-Dlfi5L4N.js.gz +0 -0
- package/dist/dashboard/assets/SetupPage-FadUOl9S.js.gz +0 -0
- package/dist/dashboard/assets/SortableList-Cfy6_Khv.js.gz +0 -0
- package/dist/dashboard/assets/UsagePage-BT4MyQeT.js.gz +0 -0
- package/dist/dashboard/assets/api-keys-DQYLQxpW.js.gz +0 -0
- package/dist/dashboard/assets/app-CX_Z8cMs.css +0 -2
- package/dist/dashboard/assets/app-CX_Z8cMs.css.gz +0 -0
- package/dist/dashboard/assets/assert-C9FD_JwJ.js.gz +0 -0
- package/dist/dashboard/assets/badge-Bvyr7D0u.js.gz +0 -0
- package/dist/dashboard/assets/banner-DIvKAZih.js.gz +0 -0
- package/dist/dashboard/assets/card-D5_gYIS_.js.gz +0 -0
- package/dist/dashboard/assets/cli-tools-CNqzrfdb.js.gz +0 -0
- package/dist/dashboard/assets/clipboard-button-B6vDBtbm.js.gz +0 -0
- package/dist/dashboard/assets/dialog-CpjrgdwJ.js.gz +0 -0
- package/dist/dashboard/assets/drawer-BWmt3b5y.js.gz +0 -0
- package/dist/dashboard/assets/entry-B-gvimrg.js +0 -1
- package/dist/dashboard/assets/entry-B-gvimrg.js.gz +0 -0
- package/dist/dashboard/assets/entry-C_oakV3z.js.gz +0 -0
- package/dist/dashboard/assets/entry-Dj0cHfEc.js +0 -4
- package/dist/dashboard/assets/entry-Dj0cHfEc.js.gz +0 -0
- package/dist/dashboard/assets/github-badge-RRHHWGxh.js.gz +0 -0
- package/dist/dashboard/assets/index-Bhey_rg_.js.gz +0 -0
- package/dist/dashboard/assets/inline-C2_EQ5Uf.js.gz +0 -0
- package/dist/dashboard/assets/input-BMRlQ450.js.gz +0 -0
- package/dist/dashboard/assets/layout-XR5xP8ew.js.gz +0 -0
- package/dist/dashboard/assets/list-row-Cw07dioc.js.gz +0 -0
- package/dist/dashboard/assets/live-BivGfuUs.js.gz +0 -0
- package/dist/dashboard/assets/model-bans-CmffjLuG.js.gz +0 -0
- package/dist/dashboard/assets/mutation-46P0oWMe.js.gz +0 -0
- package/dist/dashboard/assets/numbers-DrdA9oSM.js.gz +0 -0
- package/dist/dashboard/assets/query-keys-BFhGpwR1.js.gz +0 -0
- package/dist/dashboard/assets/routing-CAb4F37R.js.gz +0 -0
- package/dist/dashboard/assets/select-CxVVB__N.js.gz +0 -0
- package/dist/dashboard/assets/settings-DNX9sydi.js.gz +0 -0
- package/dist/dashboard/assets/stack-uPOwM9Hs.js.gz +0 -0
- package/dist/dashboard/assets/state-D1Yz79iL.js.gz +0 -0
- package/dist/dashboard/assets/switch-sevsRrRo.js.gz +0 -0
- package/dist/dashboard/assets/useMutation-Dem0lXQj.js.gz +0 -0
- package/src/observability/event-compaction.ts +0 -317
- package/src/observability/event-day-index.ts +0 -439
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// stays bespoke; the chat leg is a declarative spec row.
|
|
4
4
|
import type { ProviderDispatchTarget, ProviderAdapter, ProviderDispatchContext } from "../provider-contracts";
|
|
5
5
|
import type { ModelDefinition } from "../provider-model-definition";
|
|
6
|
+
import type { ProviderModelDiscovery } from "../discovery/discovery-types";
|
|
6
7
|
import { providerBaseUrl } from "../provider-metadata";
|
|
7
8
|
import { defineModel, isResponsesNativeModelId } from "../provider-model-definition";
|
|
8
9
|
import { createApiKeyAdapter, type ApiKeyProviderSpec } from "../configured-provider";
|
|
@@ -12,6 +13,7 @@ import type { CanonicalEvent, CanonicalRequest, ContentPart } from "../../protoc
|
|
|
12
13
|
import { GatewayError } from "../../protocol/gateway-error";
|
|
13
14
|
import { applyParamQuirks } from "../../transport/translation/quirks";
|
|
14
15
|
import { buildClaudeMessagesRequest, filterClaudeCustomHeaders } from "./shared/claude-messages";
|
|
16
|
+
import { resolveInboundSessionId } from "../operations/session-resolution";
|
|
15
17
|
import { isRecord } from "../../protocol/codecs";
|
|
16
18
|
import { sendClaudeMessagesRequest } from "../../protocol/upstream/send-claude-messages";
|
|
17
19
|
|
|
@@ -91,6 +93,46 @@ export function ensureInferhubMessagesTextBreakpoints(
|
|
|
91
93
|
export const INFERHUB_BASE_URL = providerBaseUrl("inferhub");
|
|
92
94
|
export const INFERHUB_PROVIDER_ID = "inferhub" as const;
|
|
93
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Live `/v1/models` discovery for InferHub.
|
|
98
|
+
*
|
|
99
|
+
* The generic OpenAI discovery loader classifies a model as `responses` only
|
|
100
|
+
* when `isResponsesNativeModelId` matches and otherwise says `chat`, so every
|
|
101
|
+
* Claude-backed InferHub id came back `chat` — and the chat wire strips
|
|
102
|
+
* thinking and native tool_use server-side. The wire family is therefore
|
|
103
|
+
* re-derived here from the id, the same way the offline catalog does it, with
|
|
104
|
+
* Claude ids forced onto Messages.
|
|
105
|
+
*/
|
|
106
|
+
export function inferhubModelDiscovery(): () => Promise<ProviderModelDiscovery> {
|
|
107
|
+
return async () => async (input) => {
|
|
108
|
+
// dynamic-import: the OpenAI `/models` fetcher is the same module every
|
|
109
|
+
// discovery-backed provider loads lazily, and a static import here would
|
|
110
|
+
// pull it into every process that touches InferHub metadata.
|
|
111
|
+
const { fetchOpenAICompatibleModels } = await import("../discovery/openai-model-discovery");
|
|
112
|
+
const models = await fetchOpenAICompatibleModels({
|
|
113
|
+
baseUrl: input.baseUrl,
|
|
114
|
+
providerId: INFERHUB_PROVIDER_ID,
|
|
115
|
+
headers: { authorization: `Bearer ${input.credential}` },
|
|
116
|
+
...(input.fetcher ? { fetcher: input.fetcher } : {}),
|
|
117
|
+
});
|
|
118
|
+
// A `config_read` key is rejected by the inference host with 403, and any
|
|
119
|
+
// other failure leaves `models` null. Neither means "InferHub has no
|
|
120
|
+
// models" — the committed list is a valid answer, so probing keeps working
|
|
121
|
+
// instead of failing the whole refresh with "no usable models".
|
|
122
|
+
const source: readonly ModelDefinition[] =
|
|
123
|
+
models === null || models.length === 0 ? INFERHUB_MODELS : models;
|
|
124
|
+
return source.map((model) =>
|
|
125
|
+
isInferhubClaudeModel(model.modelId)
|
|
126
|
+
? {
|
|
127
|
+
...model,
|
|
128
|
+
wireFamily: "messages" as const,
|
|
129
|
+
endpointPath: "/v1/messages",
|
|
130
|
+
}
|
|
131
|
+
: model,
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
94
136
|
/**
|
|
95
137
|
* Chat + Responses legs of InferHub. Claude-backed models are routed to
|
|
96
138
|
* `InferhubMessagesAdapter` by wire family instead (see
|
|
@@ -99,85 +141,159 @@ export const INFERHUB_PROVIDER_ID = "inferhub" as const;
|
|
|
99
141
|
* `POST /v1/responses` (native reasoning + tool_use survive; the chat wire
|
|
100
142
|
* answers too but strips reasoning server-side).
|
|
101
143
|
*/
|
|
144
|
+
/**
|
|
145
|
+
* InferHub pins a conversation to one upstream provider for as long as
|
|
146
|
+
* `X-Session-Id` stays the same, which is what keeps the prompt cache warm
|
|
147
|
+
* across turns (the pin lapses after roughly ten minutes idle). The id is the
|
|
148
|
+
* client's own session when it sends one and a stable affinity key derived from
|
|
149
|
+
* the opening turn otherwise — never a per-request random value, which would
|
|
150
|
+
* re-pin on every turn and defeat the header.
|
|
151
|
+
*/
|
|
152
|
+
function inferhubSessionHeaders(
|
|
153
|
+
context: ProviderDispatchContext,
|
|
154
|
+
request?: CanonicalRequest,
|
|
155
|
+
): Record<string, string> {
|
|
156
|
+
const sessionId = resolveInboundSessionId(context, request);
|
|
157
|
+
return sessionId === undefined ? {} : { "X-Session-Id": sessionId };
|
|
158
|
+
}
|
|
159
|
+
|
|
102
160
|
const INFERHUB_CHAT_SPEC: ApiKeyProviderSpec = {
|
|
103
161
|
provider_id: INFERHUB_PROVIDER_ID,
|
|
104
162
|
endpoint_paths_by_wire_family: { responses: "/responses" },
|
|
163
|
+
buildExtraHeaders: (context, request) => inferhubSessionHeaders(context, request),
|
|
105
164
|
};
|
|
106
165
|
|
|
107
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Offline fallback, used only when a live `/v1/models` read fails or returns
|
|
168
|
+
* nothing — a `config_read` key is rejected by the inference host with 403, so
|
|
169
|
+
* a failed discovery is common and is not "InferHub has no models".
|
|
170
|
+
*
|
|
171
|
+
* Every context, output, modality and reasoning scale below is copied from the
|
|
172
|
+
* upstream's own `/api/catalog` row rather than guessed, because a wrong limit
|
|
173
|
+
* is worse than a missing one: an overstated context window is rejected by the
|
|
174
|
+
* provider at request time, and an understated one truncates silently.
|
|
175
|
+
*
|
|
176
|
+
* Only `ag/` and `cc/` are listed. The marketplace republishes its whole roster
|
|
177
|
+
* (270 rows across 21 upstreams) and moves faster than a committed array can,
|
|
178
|
+
* so a wider hand-kept list would be stale the moment it was written.
|
|
179
|
+
*/
|
|
108
180
|
const INFERHUB_MODELS_RAW: readonly {
|
|
109
181
|
id: string;
|
|
110
|
-
|
|
111
|
-
|
|
182
|
+
/** Null when the upstream states no window; `defineModel` marks it estimated. */
|
|
183
|
+
contextLimit: number | null;
|
|
184
|
+
outputLimit: number | null;
|
|
185
|
+
/** Upstream `modalities`. A row without `image` must not advertise vision. */
|
|
186
|
+
readonly modalities?: readonly ("text" | "image" | "video")[];
|
|
187
|
+
/** Upstream `reasoningLevels`; absent means the model exposes no scale. */
|
|
188
|
+
readonly reasoningLevels?: readonly string[];
|
|
112
189
|
}[] = [
|
|
113
|
-
// ag/ — Antigravity
|
|
114
|
-
{ id: "ag/claude-
|
|
115
|
-
{ id: "ag/
|
|
116
|
-
{ id: "ag/
|
|
117
|
-
{ id: "ag/
|
|
118
|
-
|
|
119
|
-
{ id: "
|
|
120
|
-
|
|
121
|
-
{ id: "cc/claude-
|
|
122
|
-
{ id: "cc/claude-
|
|
123
|
-
{ id: "cc/claude-
|
|
124
|
-
{ id: "cc/claude-
|
|
125
|
-
{ id: "cc/claude-opus-5", contextLimit:
|
|
126
|
-
{ id: "cc/claude-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
{ id: "cc/claude-
|
|
130
|
-
{ id: "cc/claude-
|
|
131
|
-
|
|
132
|
-
{ id: "
|
|
133
|
-
{ id: "
|
|
134
|
-
|
|
135
|
-
{ id: "cb/
|
|
136
|
-
{ id: "cb/
|
|
137
|
-
{ id: "cb/
|
|
138
|
-
{ id: "cb/
|
|
139
|
-
{ id: "cb/
|
|
140
|
-
{ id: "cb/
|
|
141
|
-
{ id: "cb/
|
|
142
|
-
{ id: "cb/
|
|
143
|
-
{ id: "cb/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
{ id: "cbcn/deepseek-v4-pro", contextLimit: 1000000, outputLimit:
|
|
147
|
-
{ id: "cbcn/
|
|
148
|
-
{ id: "cbcn/glm-5.3", contextLimit: 1000000, outputLimit:
|
|
149
|
-
{ id: "cbcn/glm-5.3-flash", contextLimit: 1000000, outputLimit:
|
|
150
|
-
{ id: "cbcn/
|
|
151
|
-
{ id: "cbcn/kimi-k2.
|
|
152
|
-
{ id: "cbcn/kimi-k3", contextLimit:
|
|
153
|
-
{ id: "cbcn/minimax-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{ id: "
|
|
157
|
-
{ id: "
|
|
158
|
-
{ id: "
|
|
159
|
-
{ id: "
|
|
160
|
-
|
|
161
|
-
{ id: "
|
|
162
|
-
{ id: "
|
|
163
|
-
{ id: "
|
|
164
|
-
{ id: "
|
|
165
|
-
{ id: "
|
|
166
|
-
|
|
167
|
-
{ id: "
|
|
168
|
-
{ id: "
|
|
169
|
-
{ id: "
|
|
170
|
-
{ id: "
|
|
171
|
-
{ id: "
|
|
172
|
-
{ id: "
|
|
173
|
-
{ id: "
|
|
174
|
-
|
|
175
|
-
{ id: "
|
|
176
|
-
{ id: "
|
|
177
|
-
|
|
178
|
-
{ id: "
|
|
179
|
-
{ id: "
|
|
180
|
-
{ id: "
|
|
190
|
+
// ag/ — Antigravity. Every row: 1M context, text+image input, text output.
|
|
191
|
+
{ id: "ag/claude-opus-4-6-thinking", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"] },
|
|
192
|
+
{ id: "ag/claude-opus-5-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["low", "medium", "high"] },
|
|
193
|
+
{ id: "ag/claude-sonnet-4-6", contextLimit: 1000000, outputLimit: 64000, modalities: ["text", "image"] },
|
|
194
|
+
{ id: "ag/claude-sonnet-5-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["low", "medium", "high"] },
|
|
195
|
+
{ id: "ag/gemini-3.8-flash-high", contextLimit: 1000000, outputLimit: 65536, modalities: ["text", "image"], reasoningLevels: ["low", "medium", "high"] },
|
|
196
|
+
{ id: "ag/gemini-4-argon", contextLimit: 1000000, outputLimit: 65536, modalities: ["text", "image"], reasoningLevels: ["low", "medium", "high"] },
|
|
197
|
+
// cc/ — Claude Code. Haiku 4-5 and Opus 4-5 are the 200k-context rows.
|
|
198
|
+
{ id: "cc/claude-fable-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"] },
|
|
199
|
+
{ id: "cc/claude-fable-5-1", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"] },
|
|
200
|
+
{ id: "cc/claude-haiku-4-5", contextLimit: 200000, outputLimit: 64000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
201
|
+
{ id: "cc/claude-haiku-5-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
202
|
+
{ id: "cc/claude-opus-4-5", contextLimit: 200000, outputLimit: 64000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
203
|
+
{ id: "cc/claude-opus-4-6", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
204
|
+
{ id: "cc/claude-opus-4-7", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
205
|
+
{ id: "cc/claude-opus-4-8", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
206
|
+
{ id: "cc/claude-opus-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
207
|
+
{ id: "cc/claude-opus-5-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["low", "medium", "high"] },
|
|
208
|
+
{ id: "cc/claude-sonnet-4-6", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
209
|
+
{ id: "cc/claude-sonnet-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["none", "low", "medium", "high"] },
|
|
210
|
+
{ id: "cc/claude-sonnet-5-5", contextLimit: 1000000, outputLimit: 128000, modalities: ["text", "image"], reasoningLevels: ["low", "medium", "high"] },
|
|
211
|
+
// cb/
|
|
212
|
+
{ id: "cb/claude-opus-4.6", contextLimit: 1000000, outputLimit: 128000, modalities: ["text","image"] },
|
|
213
|
+
{ id: "cb/claude-opus-4.7-1m", contextLimit: 1000000, outputLimit: 128000, modalities: ["text","image"] },
|
|
214
|
+
{ id: "cb/deepseek-v4.1-flash", contextLimit: 1000000, outputLimit: 393216, modalities: ["text","image"] },
|
|
215
|
+
{ id: "cb/gemini-2.5-flash-image", contextLimit: null, outputLimit: null, modalities: ["text","image"] },
|
|
216
|
+
{ id: "cb/gemini-3.1-pro", contextLimit: 1000000, outputLimit: 65536, modalities: ["text","image","video"], reasoningLevels: ["low","high"] },
|
|
217
|
+
{ id: "cb/glm-5.3", contextLimit: 1000000, outputLimit: 48000, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
218
|
+
{ id: "cb/glm-5.3-flash", contextLimit: 1000000, outputLimit: 48000, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
219
|
+
{ id: "cb/gpt-5.3-codex", contextLimit: 272000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["low","medium","high"] },
|
|
220
|
+
{ id: "cb/kimi-k3.1-pro", contextLimit: 1000000, outputLimit: 32000, modalities: ["text","image"], reasoningLevels: ["low","high","max"] },
|
|
221
|
+
{ id: "cb/minimax-m3.1-flash", contextLimit: 1000000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["low","medium","high","xhigh","max"] },
|
|
222
|
+
// cbcn/
|
|
223
|
+
{ id: "cbcn/deepseek-v4-pro", contextLimit: 1000000, outputLimit: 393216, modalities: ["text","image"] },
|
|
224
|
+
{ id: "cbcn/deepseek-v4.1-flash", contextLimit: 1000000, outputLimit: 128000, modalities: ["text","image"] },
|
|
225
|
+
{ id: "cbcn/glm-5.3", contextLimit: 1000000, outputLimit: 48000, modalities: ["text","image"], reasoningLevels: ["low","high","max"] },
|
|
226
|
+
{ id: "cbcn/glm-5.3-flash", contextLimit: 1000000, outputLimit: 48000, modalities: ["text","image"], reasoningLevels: ["low","high","max"] },
|
|
227
|
+
{ id: "cbcn/hy4-preview", contextLimit: 1000000, outputLimit: 64000, modalities: ["text","image"] },
|
|
228
|
+
{ id: "cbcn/kimi-k2.8-preview", contextLimit: 1000000, outputLimit: 32000, modalities: ["text","image"], reasoningLevels: ["none","low","high","max"] },
|
|
229
|
+
{ id: "cbcn/kimi-k3.1-pro", contextLimit: 1000000, outputLimit: 32000, modalities: ["text","image"], reasoningLevels: ["low","high","max"] },
|
|
230
|
+
{ id: "cbcn/minimax-m3.1-flash", contextLimit: 1000000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["low","medium","high","xhigh","max"] },
|
|
231
|
+
// cmc/
|
|
232
|
+
{ id: "cmc/MiniMaxAI/MiniMax-M3", contextLimit: 1000000, outputLimit: 262144, modalities: ["text"] },
|
|
233
|
+
{ id: "cmc/Qwen/Qwen3.7-Max", contextLimit: 1000000, outputLimit: null, modalities: ["text"] },
|
|
234
|
+
{ id: "cmc/Qwen/Qwen3.7-Plus", contextLimit: 1000000, outputLimit: null, modalities: ["text"] },
|
|
235
|
+
{ id: "cmc/Qwen/Qwen3.8-Flash", contextLimit: 1000000, outputLimit: 131072, modalities: ["text"] },
|
|
236
|
+
{ id: "cmc/Qwen/Qwen3.8-Max", contextLimit: 1000000, outputLimit: 131072, modalities: ["text"] },
|
|
237
|
+
{ id: "cmc/deepseek/deepseek-v4-flash", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"], reasoningLevels: ["none","low","high","max"] },
|
|
238
|
+
{ id: "cmc/deepseek/deepseek-v4-pro", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"], reasoningLevels: ["none","low","high","max"] },
|
|
239
|
+
{ id: "cmc/deepseek/deepseek-v4.1-flash", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"], reasoningLevels: ["none","low","high","max"] },
|
|
240
|
+
{ id: "cmc/deepseek/deepseek-v4.1-flash-fast", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"], reasoningLevels: ["none","low","high","max"] },
|
|
241
|
+
{ id: "cmc/gpt-5.6-luna", contextLimit: 1050000, outputLimit: null, modalities: ["text"] },
|
|
242
|
+
{ id: "cmc/gpt-6-luna", contextLimit: 1050000, outputLimit: null, modalities: ["text"] },
|
|
243
|
+
{ id: "cmc/meituan/LongCat-2.0", contextLimit: 1048576, outputLimit: null, modalities: ["text"] },
|
|
244
|
+
{ id: "cmc/meta/muse-spark-1.2", contextLimit: 1000000, outputLimit: null, modalities: ["text"] },
|
|
245
|
+
{ id: "cmc/meta/muse-spark-1.2-contributor", contextLimit: 1000000, outputLimit: null, modalities: ["text"] },
|
|
246
|
+
{ id: "cmc/meta/muse-spark-1.3", contextLimit: 1000000, outputLimit: null, modalities: ["text"] },
|
|
247
|
+
{ id: "cmc/meta/muse-spark-1.3-contributor", contextLimit: 1000000, outputLimit: null, modalities: ["text"] },
|
|
248
|
+
{ id: "cmc/mistral/mistral-large-4", contextLimit: 524288, outputLimit: 262144, modalities: ["text"] },
|
|
249
|
+
{ id: "cmc/moonshotai/Kimi-K2.6", contextLimit: 262144, outputLimit: null, modalities: ["text"] },
|
|
250
|
+
{ id: "cmc/moonshotai/Kimi-K2.7-Code", contextLimit: 262144, outputLimit: null, modalities: ["text"] },
|
|
251
|
+
{ id: "cmc/moonshotai/Kimi-K2.7-Code-Highspeed", contextLimit: 262144, outputLimit: null, modalities: ["text"] },
|
|
252
|
+
{ id: "cmc/moonshotai/Kimi-K3", contextLimit: 1000000, outputLimit: null, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
253
|
+
{ id: "cmc/moonshotai/Kimi-K3.1-Pro", contextLimit: 1000000, outputLimit: null, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
254
|
+
{ id: "cmc/tencent/hy4-preview", contextLimit: 1048576, outputLimit: 64000, modalities: ["text"] },
|
|
255
|
+
{ id: "cmc/xai/grok-4.5", contextLimit: 500000, outputLimit: null, modalities: ["text"] },
|
|
256
|
+
{ id: "cmc/xai/grok-4.6", contextLimit: 500000, outputLimit: null, modalities: ["text"] },
|
|
257
|
+
{ id: "cmc/xai/grok-4.7", contextLimit: 500000, outputLimit: null, modalities: ["text"] },
|
|
258
|
+
{ id: "cmc/xiaomi/mimo-v2.6-flash", contextLimit: 1000000, outputLimit: 131072, modalities: ["text"] },
|
|
259
|
+
{ id: "cmc/xiaomi/mimo-v2.6-pro", contextLimit: 1000000, outputLimit: 131072, modalities: ["text"] },
|
|
260
|
+
{ id: "cmc/z-ai/glm-5.3-flashx", contextLimit: 1000000, outputLimit: 128000, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
261
|
+
{ id: "cmc/zai-org/GLM-5.2", contextLimit: 1000000, outputLimit: 128000, modalities: ["text"], reasoningLevels: ["high","max"] },
|
|
262
|
+
{ id: "cmc/zai-org/GLM-5.3", contextLimit: 1000000, outputLimit: 128000, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
263
|
+
// grok/
|
|
264
|
+
{ id: "grok/grok-4.5", contextLimit: 500000, outputLimit: null, modalities: ["text","image"], reasoningLevels: ["low","medium","high"] },
|
|
265
|
+
{ id: "grok/grok-4.6", contextLimit: 500000, outputLimit: null, modalities: ["text"] },
|
|
266
|
+
{ id: "grok/grok-4.7", contextLimit: 500000, outputLimit: null, modalities: ["text"] },
|
|
267
|
+
{ id: "grok/grok-4.7-build-fast", contextLimit: 500000, outputLimit: null, modalities: ["text"], reasoningLevels: ["low","medium","high","xhigh"] },
|
|
268
|
+
// mm/
|
|
269
|
+
{ id: "mm/MiniMax-M3.1-Flash", contextLimit: 1000000, outputLimit: 524288, modalities: ["text","image"], reasoningLevels: ["low","medium","high","xhigh","max"] },
|
|
270
|
+
// mmcn/
|
|
271
|
+
{ id: "mmcn/MiniMax-M3.1-Flash", contextLimit: 1000000, outputLimit: 524288, modalities: ["text","image"], reasoningLevels: ["low","medium","high","xhigh","max"] },
|
|
272
|
+
// cx/
|
|
273
|
+
{ id: "cx/gpt-5.6-luna", contextLimit: 272000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["none","low","medium","high","xhigh","max"] },
|
|
274
|
+
{ id: "cx/gpt-5.6-sol", contextLimit: 272000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["none","low","medium","high","xhigh","max"] },
|
|
275
|
+
{ id: "cx/gpt-5.6-terra", contextLimit: 272000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["none","low","medium","high","xhigh","max"] },
|
|
276
|
+
{ id: "cx/gpt-6-astra", contextLimit: 272000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["low","medium","high","xhigh","max"] },
|
|
277
|
+
{ id: "cx/gpt-6-luna", contextLimit: 272000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["none","low","medium","high","xhigh","max"] },
|
|
278
|
+
{ id: "cx/gpt-6-sol", contextLimit: 272000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["none","low","medium","high","xhigh","max"] },
|
|
279
|
+
{ id: "cx/gpt-6.1-sol", contextLimit: 500000, outputLimit: 128000, modalities: ["text","image"], reasoningLevels: ["low","medium","high","xhigh","max"] },
|
|
280
|
+
{ id: "cx/gpt-image-2-codex", contextLimit: null, outputLimit: null, modalities: ["text"] },
|
|
281
|
+
// ocg/
|
|
282
|
+
{ id: "ocg/deepseek-v4.1-flash", contextLimit: 1000000, outputLimit: 393216, modalities: ["text","image"] },
|
|
283
|
+
// ali/
|
|
284
|
+
{ id: "ali/deepseek-v4-flash-0731", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"] },
|
|
285
|
+
{ id: "ali/deepseek-v4-pro-0813", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"] },
|
|
286
|
+
{ id: "ali/deepseek-v4.1-flash", contextLimit: 1000000, outputLimit: 393216, modalities: ["text","image"] },
|
|
287
|
+
{ id: "ali/deepseek-v4.1-flash-1017", contextLimit: 1000000, outputLimit: 393216, modalities: ["text","image"] },
|
|
288
|
+
{ id: "ali/glm-5.3", contextLimit: 1000000, outputLimit: 128000, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
289
|
+
{ id: "ali/kimi-k2.7-code", contextLimit: 262144, outputLimit: null, modalities: ["text","image"] },
|
|
290
|
+
// alicn/
|
|
291
|
+
{ id: "alicn/deepseek-v4-flash-0731", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"] },
|
|
292
|
+
{ id: "alicn/deepseek-v4-pro-0813", contextLimit: 1000000, outputLimit: 393216, modalities: ["text"] },
|
|
293
|
+
{ id: "alicn/deepseek-v4.1-flash", contextLimit: 1000000, outputLimit: 393216, modalities: ["text","image"] },
|
|
294
|
+
{ id: "alicn/deepseek-v4.1-flash-1017", contextLimit: 1000000, outputLimit: 393216, modalities: ["text","image"] },
|
|
295
|
+
{ id: "alicn/glm-5.3", contextLimit: 1000000, outputLimit: 128000, modalities: ["text"], reasoningLevels: ["low","high","max"] },
|
|
296
|
+
{ id: "alicn/kimi-k2.7-code", contextLimit: 262144, outputLimit: null, modalities: ["text","image"] },
|
|
181
297
|
] as const;
|
|
182
298
|
/**
|
|
183
299
|
* Claude-backed inferhub models (`*claude-*` across `ag/`/`cb/`/`cc/`) speak
|
|
@@ -238,6 +354,11 @@ export class InferhubMessagesAdapter implements ProviderAdapter {
|
|
|
238
354
|
endpointPath: candidate.endpoint_path,
|
|
239
355
|
mutatePayload: ensureInferhubMessagesTextBreakpoints,
|
|
240
356
|
});
|
|
357
|
+
// Same conversation pin as the chat leg, applied after the shared Claude
|
|
358
|
+
// header builder rather than through `customHeaders`: that field is
|
|
359
|
+
// credential-derived (it is filtered and round-trips per account), and a
|
|
360
|
+
// per-conversation value does not belong in it.
|
|
361
|
+
Object.assign(outbound.headers, inferhubSessionHeaders(context, request));
|
|
241
362
|
yield* sendClaudeMessagesRequest(
|
|
242
363
|
outbound.url,
|
|
243
364
|
outbound.headers,
|
|
@@ -310,8 +431,15 @@ export const INFERHUB_MODELS: readonly ModelDefinition[] = INFERHUB_MODELS_RAW.m
|
|
|
310
431
|
id: e.id,
|
|
311
432
|
ctx: e.contextLimit,
|
|
312
433
|
out: e.outputLimit,
|
|
313
|
-
|
|
314
|
-
|
|
434
|
+
// Vision follows the upstream's own `modalities` rather than a blanket
|
|
435
|
+
// true: a row that does not accept images must not advertise that it does.
|
|
436
|
+
vision: e.modalities?.includes("image") ?? false,
|
|
437
|
+
// Reasoning is driven by the scale the upstream publishes. A model with no
|
|
438
|
+
// `reasoningLevels` at all exposes no effort control, so claiming it would
|
|
439
|
+
// let the console offer an effort the provider ignores.
|
|
440
|
+
...(e.reasoningLevels !== undefined && e.reasoningLevels.length > 0
|
|
441
|
+
? { reasoning: true, reasoningEfforts: e.reasoningLevels }
|
|
442
|
+
: { reasoning: false }),
|
|
315
443
|
// Claude-backed models resolve to messages rows so thinking blocks and
|
|
316
444
|
// native tool_use survive; the chat wire strips both server-side.
|
|
317
445
|
// GPT-5/6 + o-series resolve to responses rows for the same reason.
|