Skip to content

Seed catalog offerings so Anthropic defaults to claude-sonnet-5 (CL-7294) - #599

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7294-make-the-anthropic-default-model-match-seed-configuration-in
Sep 4, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-7294-make-the-anthropic-default-model-match-seed-configuration-in

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Fixes CL-7294

Catalog seeding used one priority per provider, so every Anthropic model tied at 0 and runtime localeCompare picked claude-fable-5 over the declared default. Offerings now get distinct priorities from the flattened CATALOG_SEEDS order (claude-sonnet-5 is index 0), and a 409 reconciles via GET then PATCH instead of skipping forever.

Supersedes #546 (stale hub-client branch; that package is gone on main).

Anthropic currently seeds every model at the same provider-level
priority, so localeCompare picks claude-fable-5 over the declared
default. A 409 on an existing offering is skipped forever, so a
re-seed cannot repair that. These tests pin distinct declared
priorities and a GET/PATCH reconcile on conflict.
Flatten CATALOG_SEEDS into one priority sequence so Anthropic claude-sonnet-5 is priority 0 instead of tying with every other Anthropic model. A 409 now lists the existing offering and PATCHes priority when it has drifted.
@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Self-review

Verdict: the fix correctly flattens offering priorities across providers so Anthropic's declared default gets the lowest distinct priority, and the 409-path GET+PATCH reconciliation matches the actual hub route (cursor-paginated GET, PATCH accepting priority). No defects found; nothing changed.

  • CONFIRMED-FIXED: none needed — reviewed the diff against vendor/intx/hub-api/src/routes/model-offerings.ts and found the new pagination/PATCH usage matches the real route contract exactly.
  • DISMISSED: Ollama's dynamically-probed model count could in theory exceed the static CATALOG_SEEDS.ollama.models.length used to compute the priority offset for providers declared after it, reintroducing a priority collision. Not a live bug: ollama is the last key in CATALOG_SEEDS, so no provider's offset depends on its static count today.
  • DISMISSED: as casts on body in the new/updated test fixtures are test-only fake-handler code, not production trust-boundary parsing.

Targeted tests run:

  • bun test packages/seeding/test/seed.test.ts — 45 pass, 0 fail
  • bun test packages/onboarding/test/complete-credential.test.ts packages/onboarding/test/huggingface-connect-routes.test.ts packages/onboarding/test/openrouter-connect-routes.test.ts — 53 pass, 0 fail
  • bun run typecheck — clean

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

CL-7294

@TheGreatAxios
TheGreatAxios merged commit ecf1323 into main Sep 4, 2026
7 checks passed
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.

1 participant