Skip to content

fix(core): accept both sap-ai-provider package names - #67848

Merged
rekram1-node merged 2 commits into
anomalyco:devfrom
jerome-benoit:sap-provider-names
Dec 3, 2026
Merged

rekram1-node merged 2 commits into
anomalyco:devfrom
jerome-benoit:sap-provider-names

Conversation

@jerome-benoit

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

Copy link
Copy Markdown
Contributor

Issue for this PR

Related to #66153 and anomalyco/models.dev#14509. This does not close the V2 stream issue.

Type of change

  • Bug fix

What does this PR do?

If models.dev switches to the unsuffixed SAP package today, Core puts reasoning options under the provider ID instead of sap-ai. Both package names now share the sap-ai options key, SAP reasoning variants, and catalog base URL exclusion. No flag or catalog change is needed.

Core loads the unsuffixed package root (.), which returns a V3 model. #66164 adapts legacy V2 models to V3; it is not needed for this entrypoint. This PR leaves the legacy loader and V2 stream behavior unchanged.

The v1 publish workflow still has a release path, and npm latest is 1.19.6. Backport: #67849.

How did you verify your code works?

  • Core: bun run script/test.ts test/aisdk.test.ts test/variant.test.ts test/provider.test.ts test/plugin/models-dev.test.ts test/plugin/provider-sap-ai-core.test.ts — 90 passed. The request test checks SAP's actual modelParams.reasoning_effort field for both package names.
  • Root: bun run typecheck — 37 tasks passed. bun run --cwd packages/core typecheck:tsc passed. bun run lint:changed and direct Oxlint on the changed Core TypeScript files passed. The pre-push bun run check also passed.
  • Loaded the published 5.1.2 factories without SAP credentials: unsuffixed root returned V3; the legacy package returned V2.

Screenshots / recordings

Not a UI change.

Checklist

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

Added by the opencode bot (AI-generated).

Related: #66153

Preserve SAP reasoning options, variants, and URL handling when
models.dev switches to the unsuffixed, V3 provider package.

@opencodejr opencodejr 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.

Looks good. With the PR's tests run against the base source, the three new SAP checks fail; with this change they pass: the options key, the reasoning variants and the catalog base-URL check, for both package names (90/90 in the core test files you listed). typecheck:tsc for packages/core passes too. I couldn't test against a real SAP AI Core deployment because there are no credentials here.

Public API: unchanged. The new SAP_AI_CORE_PACKAGES constant is internal to core.

No concerns.

Related: #66153

@opencodejr opencodejr 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.

The new commit only updates the provider-option test so the SAP cases use SAP's real modelParams.reasoning_effort setting. It passes for both package names, and aisdk, variant and provider tests plus typecheck:tsc pass. No source code changed since the last review, and I have no concerns.

Public API: unchanged.

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.

2 participants