fix(llm): add @ai-sdk/openai-compatible to sdkKey mapping - #34602
Closed
Robin1987China wants to merge 1 commit into
Closed
fix(llm): add @ai-sdk/openai-compatible to sdkKey mapping#34602Robin1987China wants to merge 1 commit into
Robin1987China wants to merge 1 commit into
Conversation
sdkKey() maps npm packages to the providerOptions namespace the AI SDK expects, but had no case for @ai-sdk/openai-compatible. This caused provider options (reasoningEffort, etc.) to be written under the custom providerID key, which @ai-sdk/openai-compatible never reads. Add the missing case so the key written matches the key the SDK reads. Closes anomalyco#5674
Collaborator
|
I left a comment on the issue with what I found: https://github.com/anomalyco/opencode/issues/5674#issuecomment-4850281402\n\nPlease follow up with me if you think this is incorrect. Closing for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #5674
Type of change
What does this PR do?
The sdkKey() in transform.ts maps provider names to SDK configuration namespaces but is missing the @ai-sdk/openai-compatible case. This means providers wrapping OpenAI-compatible APIs (e.g., vLLM, Ollama) never pick up their SDK-level options like baseURL or headers from opencode.json because the key falls back to model.providerID which does not match the "openaiCompatible" namespace the SDK actually reads.
This adds the missing case.
How did you verify your code works?
Checklist