feat(sync): add Merge Gateway model sync - #3249
Conversation
Action items
|
|
@rekram1-node can you take a look when you get a second? |
1d49bd6 to
0ec6a52
Compare
|
Addressed the automated review and cache-pricing follow-up in
Verification: 51 focused tests pass, |
Action items
|
0ec6a52 to
be29539
Compare
be29539 to
31a3612
Compare
|
Fixed the follow-up reviewer finding in |
Action items
|
Action items
|
|
No actionable findings. |
rekram1-node
left a comment
There was a problem hiding this comment.
Action items
-
[medium] [possible mistake]
packages/core/src/sync/providers/merge-gateway.ts:206- Check: Apply the selected vendor route'ssupports_reasoningsignal instead of always preserving resolved reasoning metadata. Why: The earlier reasoning findings corrected current TOMLs, but the sync still ignores the route-specific reasoning fields documented inprovider.toml. If a route later reportssupports_reasoning = false, or selection falls back to a vendor without reasoning,existing.reasoning/existing.reasoning_optionssurvive and the generated model continues advertising unsupported controls. A conservative fix is to emitreasoning = falseand removereasoning_optionswhen the selected route explicitly reports false, while continuing to preserve curated options for supported routes whose exact values are not exposed. Add a regression test for an existing reasoning model whose selected route reports false. -
[medium] [possible mistake]
packages/core/src/sync/providers/merge-gateway.ts:261- Check: Treatprompt_caching.mode = "none"as an explicit no-cache signal. Why: The previous cache-pricing discussion fixed preservation for fields the API omits, butmergeGatewayCachePricingignoresmode; with{ mode: "none" }and no numeric fields, both?? existingfallbacks retain curated cache prices. That publishes cache pricing for a route explicitly reporting no prompt caching. Return undefined read/write prices formode = "none", and add a regression test distinct from the existingmode = "automatic"preservation test.
Action items
|
| base_model = "anthropic/claude-sonnet-4-5-20250929" | ||
| reasoning_options = [{ type = "toggle" }, { type = "budget_tokens", min = 1_024, max = 63_999 }] | ||
| name = "Claude Sonnet 4.5 (20250929)" | ||
| reasoning = false |
There was a problem hiding this comment.
????
This is plainly wrong this is a reasoning model, why are so many models marked incorrectly?
|
Your api seems to incorrectly specify Maybe we need to talk through your changes this shouldn't be too difficult but I don't wanna keep reviewing it if we are gonna have so much invalid data |
|
hey @rekram1-node, I'm getting the team on this. Will do my best to clear everything up before you need to review again |
The public /v1/models schema does not document supports_reasoning, and the live catalog populates it inconsistently across vendor routes: the same model reports true on one route and false on another (claude-opus-4-6 is false via anthropic, true via bedrock), and reasoning-only models such as deepseek-r1 report false on their sole route. Flipping reasoning = false from that field erased curated reasoning metadata on 42 models. - only confirm reasoning when an available route reports supports_reasoning = true (always accompanied by route reasoning metadata), defaulting reasoning_options to [] when none are curated - preserve curated reasoning metadata when routes report false or omit the field - restore the 42 erased reasoning entries (claude, deepseek-r1, gpt-oss, gemma, qwen, glm, nemotron, fugu) from curated values - re-sync against the live catalog: gemini-embedding-001 added, route cache_read prices and display names ingested, qwen3.5-27b limits and modalities updated Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Action items
|
Action items
|
|
Based on my comprehensive review of the PR metadata, diff (all 10 patches), AGENTS.md, README.md, sync.md, the reasoning-options audit skill, schema code, and the base-revision files, I've verified the following:
No actionable findings. |
Action items
|
a6c31ba to
8944685
Compare
|
No actionable findings. |
|
Hey @rekram1-node, sorry for all the back and forth. We've reviewed our reasoning fields, and each of the model values that we're adding here and it looks good on our end. Can you do one more review when you have a moment? Thanks so much! |
|
Hey @rekram1-node, just bumping this! Everything should be settled in terms of the model info |
Action items
|
Action items
|
Summary
GET /v1/modelscatalogbase_modelmetadataprompt_caching/ cache-price fields authoritatively when Merge exposes themdisplay_nameThe initial live sync created 43 model entries, updated 66, and deleted none.
Testing
bun models:sync merge-gateway --dry-runbun test packages/core/test/sync.test.tsbun validategit diff --checkmerge-gateway/openai/gpt-5.6-sol,merge-gateway/anthropic/claude-fable-5,merge-gateway/xai/grok-4.5, etc.Sources
Maintainer setup
The scheduled workflow requires a regular Merge Gateway API key configured as the repository Actions secret
MERGE_GATEWAY_API_KEY. The credential is not included in this PR.