Skip to content

fix(opencode): accept both sap-ai-provider package names - #67849

Open
jerome-benoit wants to merge 3 commits into
anomalyco:v1from
jerome-benoit:sap-provider-v1
Open

jerome-benoit wants to merge 3 commits into
anomalyco:v1from
jerome-benoit:sap-provider-v1

Conversation

@jerome-benoit

@jerome-benoit jerome-benoit commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Backport of #67848. Related to #30481 and anomalyco/models.dev#14509.

Type of change

  • Bug fix

What does this PR do?

Keep SAP reasoning variants, catalog effort settings, and budget settings when models.dev advertises the unsuffixed package. The v1 loader already accepts V3 via the Vercel AI SDK, so it keeps loading the published root for both names: V3 for the unsuffixed package, V2 for the deprecated package. Forcing /v2 for the unsuffixed name would drop cache-write token counts that the V3 root reports. No flag or catalog update is needed.

How did you verify your code works?

  • From packages/opencode: bun test test/provider/transform.test.ts test/provider/provider.test.ts — 715 passed, including a loader regression test that keeps the unsuffixed V3 root.
  • bun run --cwd packages/opencode typecheck passed. Direct Oxlint on the three changed TypeScript files reported no errors; warnings were outside changed lines.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Preserve SAP reasoning settings and load the V2 facade when
models.dev switches to the unsuffixed provider package.
Test User added 2 commits December 2, 2026 20:31
The V2 facade drops cache-write token counts. Keep loading the root
for existing unsuffixed configurations and preserve legacy loading.
@jerome-benoit

Copy link
Copy Markdown
Contributor Author

Courtesy backport. The 1.x line no longer receives releases (npm latest is still 1.19.6), so this
should not gate the models.dev flip. If you would rather not carry v1 patches, say so and I will
close it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant