fix(llm): preserve native provider options - #29025
Conversation
ab7ae0b to
0443b74
Compare
0443b74 to
6aaaac2
Compare
|
尽快合并这个分支吧😭 |
|
@lc8882972 just do this:
If u have that env var set this code path isnt ever hit (it isnt hit by default but this will ensure its not hit otherwise either). |
|
Why is this not merged yet? |
|
because it's an experimental library that shouldn't be utilized unless ur opting into it, so it's lower priority to fix experimental things |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Summary
Problem
A native OpenAI-compatible tool continuation could omit prior assistant
reasoning_content, causing DeepSeek thinking-mode requests to fail with HTTP 400. Auditing the local AI SDK source also found additional native option gaps for Responses and Anthropic models that opencode currently emits.Changes
reasoning_contentandreasoning_detailscontinuations and streaming deltasreasoningEffort,textVerbosity) while passing provider-specific compatible extensions throughinclude, cache, reasoning, service, and continuation-related wire optionsVerification
cd packages/llm && bun test test/provider/openai-compatible-chat.test.ts test/provider/openai-responses.test.ts test/provider/openai-chat.test.ts test/provider/anthropic-messages.test.ts && bun typecheckcd packages/opencode && bun test test/session/llm-native.test.ts test/session/llm.test.ts test/session/llm-native-recorded.test.ts && bun typecheckgit diff --check