Skip to content
Source
Sign inSign up
TanStack/schemas

Bind docs-stated chat routes for dashscope-cn, Kimi Code and Vertex Claude #733 (GitHub #734)

Mergedtombeckenhammerged 8 commits intomain fromfeat/716-endpoint-probesmerged by tombeckenham View on GitHub

tombeckenhamcommented

Binds schemaEndpointId from the providers' own docs for dashscope-cn, kimi-code-plan-cn, kimi-code-plan-global and google-vertex-anthropic. No probe is added: every one of these docs states the route, and we hold no key for the region or host a probe would need. Part of #716; the issue stays open for lovable and nvidia.

Why docs parsers, not probes

All six providers set bindSyncedRoutesOnly, so the poll drops any binding whose route was never synced (poll-models.ts, around the properties.has check). dashscope-cn, both Kimi Code providers and google-vertex-anthropic synced no endpoints at all (fetchSpec returned specs: [] with a skip reason). So a probe record would have been stripped on the next poll. Each provider now syncs its documented chat route as a route-only endpoint (x-modelschemas-route-only, bindStoredRoutesWithoutSchemas), the same way OpenCode stores routes. Rows bind it from a docs parser at poll time, wrapped in tryDocs. A page that fails to parse marks the rows schemaEndpointId: unavailable, and the spec sync throws, so the stored route is kept.

The probe mechanism did not fit anyway. Route records (ProbeRecord, opencode-go) are hand-written, and --write only re-dates them. The generic #730 probe records no schemaEndpointId and treats a 2xx as stating nothing.

Per provider

  • dashscope-cn (issue: 129 rows): docs parser. https://help.aliyun.com/zh/model-studio/compatibility-of-openai-with-dashscope.md states 北京:POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/chat/completions and a 支持的模型 line by family. dashscope-cn-compat.ts reads both, and the existing dashscopeCompatCovers matches the families, as the Intl adapter does. Two more pages are read so that families on another protocol stay unbound:
    • https://help.aliyun.com/zh/model-studio/realtime.md says "通过 WebSocket、WebRTC 使用 Qwen-Omni-Realtime". That page lists no model ids (it sends readers to the console), so the title's family name Qwen-Omni-Realtime is matched by tokens, the same rule the compat line's families use. This leaves 11 rows unbound: qwen3.8-omni-flash-realtime, qwen3.5-omni-plus-realtime (+ -2026-03-15), qwen3.5-omni-flash-realtime (+ -2026-03-15), qwen3-omni-flash-realtime (+ -2025-12-01, -2025-09-15), and qwen-omni-turbo-realtime (+ -latest, -2025-05-08).
    • https://help.aliyun.com/zh/model-studio/qwen-deep-research.md says "也不支持 OpenAI 兼容接口调用". This leaves qwen-deep-research and qwen-deep-research-2025-12-15 unbound.
    • Qwen-Audio, which the compat page says is not compatible, now matches versioned ids too, so qwen2-audio-instruct is unbound. This also fixes the shared function for the Intl adapter.
    • While any of the three pages is unreadable, no dashscope-cn chat row binds (schemaEndpointId: unavailable).
    • On the committed fixtures, 159 of 204 chat rows bind. Also unbound: QwQ/QvQ and supplier-prefixed ids (siliconflow/…, vanchin/…, ZHIPU/…, Moonshot-Kimi-K2-Instruct), which the family names do not reach.
    • The page also says keys are bound per region, and our DASHSCOPE_API_KEY is the Intl (Singapore) key, so a Beijing probe was not possible.
  • kimi-code-plan-cn / kimi-code-plan-global (6 + 6): docs parser. https://www.kimi.com/code/docs/en/kimi-code/models.html has a Base URLs table with a row "OpenAI (Responses / Chat Completions)": China https://api.kimi.com/coding/v1, Overseas https://api.kimi.ai/coding/v1. The base path coding/v1 is read from that row. The /chat/completions tail is not printed on the page: it is the path of the protocol the row names (OpenAI Chat Completions), not something the page states. The evidence path says so. The route is used for every model on that page. The older page said only "OpenAI compatible", and the parser refuses that (test). All 6 rows bind in each region.
  • google-vertex-anthropic (14): docs parser. https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude/use-claude gives "HTTP method and URL" as POST https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/publishers/anthropic/models/MODEL:rawPredict. Stored as v1/projects/{projectsId}/locations/{locationsId}/publishers/anthropic/models/{modelsId}:rawPredict, which is the Vertex endpoint-id spelling. MODEL is any Claude id, so every card binds (14/14). Only :rawPredict is stored, although the page also states :streamRawPredict. Fetched through cachedGoogleDocs under a new #route key, so the 429 cooling applies to it too.
  • lovable (26): not changed. The keyless listing already states each model's route in supported_surfaces, and the adapter binds it. Only messages-only (5) and live-only (1) chat models have no OpenAI-compatible route. The rest of the gap looks like a poll issue, not a missing source: lovable is defaultDerivation: 'generated' with no rate cards, so loadInputWalks returns before it loads properties (poll-models.ts around :411), and the bindSyncedRoutesOnly check (around :829-831) then strips every listed route. Not verified against live rows (see below). It needs its own issue. No key held either (LOVABLE_API_KEY).
  • nvidia (20): not changed. NVIDIA is model-grained, and a model's endpoint is synced only from its per-model reference doc. The 20 rows are the ones with no such doc, so there is no synced route a probe could bind. No key held (NVIDIA_API_KEY).

Expected gap report after deploy and one spec sync

The binding holds only once the daily spec sync has stored the route. Before numbers could not be read: GET /v1/models answered 429 for 30 minutes from this IP. Expected endpoint gains: dashscope-cn up to +159 bound rows on the fixture catalogue (issue counts 129 missing, so most or all of them), kimi-code-plan-cn +6, kimi-code-plan-global +6, google-vertex-anthropic +14. Lovable and nvidia are unchanged. These rows are docs-derived, not probe-verified, so the verifiedAt acceptance item does not apply.

Not covered

  • Lovable: the suspected strip in loadInputWalks for generated providers with bindSyncedRoutesOnly (above).
  • NVIDIA: models with no reference doc.
  • dashscope-cn: QwQ/QvQ and supplier-prefixed ids. Binding these would need the page to name them in a form the parser can match. A Beijing key would allow probes, but only after these route-only endpoints exist.
  • No weekly-probe CI secrets or egress hosts were added, because no provider here is on the probe.

Verification

pnpm run typecheck, pnpm run lint, pnpm run check and pnpm run test (260 files, 2641 tests) pass after merging main. No live provider requests were sent. Fixtures were captured on 2026-11-21.

    1. tombeckenham pushedbfe564a

    2. tombeckenham pushedbdb64ed

    3. ⚠️ No Changeset found

      Latest commit: bdb64ed350ea336e51f811ac80ec615645dc928b

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

    4. Warning

      Review limit reached

      You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

      Next included review available in 27 minutes.

      Check out review usage here.

      View limit details

      Limit details: You’ve used the included review currently available.

      Learn how review limits work.

      Review configuration:

      Run configuration

      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: c65b4f0e-aead-4ac1-a174-b73dbc50a204
      Commits

      Reviewing files that changed from the base of the PR and between eb69bca69c5448c507f26b6838389b71ff8db033 and bdb64ed350ea336e51f811ac80ec615645dc928b.

      Files selected for processing: 23

      • src/server/providers/adapters/google-vertex-anthropic.test.ts
      • src/server/providers/adapters/google-vertex-anthropic.ts
      • src/server/providers/adapters/kimi-code-plan-cn.ts
      • src/server/providers/adapters/kimi-code-plan-global.ts
      • src/server/providers/dashscope-cn-compat.test.ts
      • src/server/providers/dashscope-cn-compat.ts
      • src/server/providers/dashscope-cn.test.ts
      • src/server/providers/dashscope-cn.ts
      • src/server/providers/dashscope-compat.test.ts
      • src/server/providers/dashscope-compat.ts
      • src/server/providers/fixtures/dashscope-cn/compatibility-of-openai-with-dashscope.md.txt
      • src/server/providers/fixtures/dashscope-cn/qwen-deep-research.md.txt
      • src/server/providers/fixtures/dashscope-cn/realtime.md.txt
      • src/server/providers/fixtures/kimi-code-models-2026-11-21.html.txt
      • src/server/providers/fixtures/vertex-claude/README.md
      • src/server/providers/fixtures/vertex-claude/use-claude.html.txt
      • src/server/providers/kimi-code-docs.test.ts
      • src/server/providers/kimi-code-docs.ts
      • src/server/providers/kimi-code.test.ts
      • src/server/providers/kimi-code.ts
      • src/server/providers/opencode-routes.ts
      • src/server/providers/vertex-claude.test.ts
      • src/server/providers/vertex-claude.ts
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share

    5. tombeckenham merged this0be704e

    6. tombeckenham closed this

Sign in to join this conversation.