Skip to content

fix: migrate provider catalogs to sparse route policies#2368

Merged
jolestar merged 1 commit into
mainfrom
fix/issue-2363-provider-catalog-migration
Jul 22, 2026
Merged

fix: migrate provider catalogs to sparse route policies#2368
jolestar merged 1 commit into
mainfrom
fix/issue-2363-provider-catalog-migration

Conversation

@jolestar

Copy link
Copy Markdown
Collaborator

Summary

  • migrate Tencent TokenHub, Xiaomi, DashScope, and Volcengine catalogs to shared canonical model metadata with sparse endpoint route policies
  • enforce a full-catalog invariant that each canonical model's intrinsic metadata is registered exactly once
  • preserve endpoint aliases, discovery behavior, and model-level-only models.catalog semantics
  • add focused runtime diagnostics and Web GUI regressions for Doubao plan/coding vision capability inheritance

This is the second and final implementation PR for #2363, following #2367.

Closes #2363.

Verification

  • cargo fmt --all -- --check
  • cargo test model_catalog (55 passed)
  • RUSTFLAGS="-D warnings" cargo check --all-targets
  • npm test -- --run src/runtime/client.test.ts (26 passed)

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holon Ready Ready Preview, Comment Jul 21, 2026 11:58pm

@jolestar

Copy link
Copy Markdown
Collaborator Author

Holon Reviewer: APPROVED ✅

Summary

Second and final PR for #2363 — migrates Tencent TokenHub, Xiaomi, DashScope, and Volcengine catalogs to shared canonical model metadata with sparse endpoint route policies. Clean continuation of the pattern from #2367.

Analysis

  • Canonical metadata verified: All removed per-endpoint entries correctly inherit from canonical entries (dashscope/*, volcengine/*, xiaomi/*, tencent-tokenhub/*), with route policy overrides preserving endpoint-specific caps (e.g., DashScope gateway 65_536 max_output cap for deepseek-v4, kimi-k2.x, glm-5.x).
  • Capability fix confirmed: Doubao seed-2-0-pro and seed-2-0-code-preview now correctly inherit supports_reasoning and image_input from canonical volcengine entries across all endpoints (default, coding, plan). Old per-endpoint entries were missing these capabilities.
  • Route definitions correct: volcengine-agent@plan/* routes resolve through volcengine-coding entries (which map to canonical volcengine), dashscope-token-plan/dashscope-coding-plan routes resolve through canonical dashscope entries.
  • reasoning_effort_options guard: Xiaomi mimo endpoint guard (default | token-plan) correctly replaces the old "xiaomi" | "xiaomi-token-plan" unconditional match.
  • Invariant test valuable: built_in_catalog_registers_each_canonical_model_metadata_once prevents future duplicate canonical registrations.
  • Net -76 lines: Successful deduplication across 4 provider catalogs.

No blocking issues found. Ready to merge once CI passes.

@holonbot holonbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: fix: migrate provider catalogs to sparse route policies

Approve. Well-structured migration that correctly consolidates duplicate provider catalog entries into canonical-model + sparse-route-policy architecture.

Verified

  • All DashScope token-plan/coding-plan route overrides match old explicit entries (context windows, max output caps, capabilities).
  • Volcengine coding/plan routes correctly inherit canonical capabilities from remaining volcengine-coding entries and canonical volcengine entries.
  • Intentional behavior change (Doubao models now inherit supports_reasoning=true, image_input=true from canonical) confirmed by new tests.
  • Tencent TokenHub dedup and Xiaomi route migration are clean.
  • reasoning_effort_options guard correctly narrows from legacy provider matching to canonical provider + endpoint guard.
  • New invariant test (built_in_catalog_registers_each_canonical_model_metadata_once) and Doubao capability inheritance tests provide good regression coverage.

Minor observation

Implicit coupling: volcengine-agent@plan routes for deepseek-v4-pro, kimi-k2.7-code, glm-5.2 etc. inherit canonical metadata from volcengine-coding entries (which canonicalize to volcengine/X). A comment near those entries noting this dependency would help future maintainators avoid accidentally breaking plan routes when cleaning up coding entries.

@holonbot

holonbot Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Holon Run Report

@jolestar
jolestar merged commit cfec356 into main Jul 22, 2026
7 checks passed
@jolestar
jolestar deleted the fix/issue-2363-provider-catalog-migration branch July 22, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: 统一模型固有能力配置并审计 plan/token 等 endpoint 的能力漂移

1 participant