feat(llm): align native runtime gate with cloud/local provider lowering (m27) - #18
Merged
Conversation
Expand the session native gate to match packages that native-request can lower (OpenAI, Anthropic, Google, Azure, Bedrock, OpenRouter, OpenAI-compatible local, xAI API key). Fail closed on missing keys/base URLs; keep xAI OAuth on AI SDK plugin fetch and OpenAI OAuth on native when fetch is present.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
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.
Milestone 27 — align native runtime gate with cloud/local provider lowering
Aligns the opencode native LLM runtime gate so cloud vs local providers lower
consistently, with the fallback path made explicit.
Changes
packages/opencode/src/session/llm/native-runtime.ts,native-request.ts— native runtime gate for the provider matrix; AI SDK fallback on missing key / required baseURL / unknown provider.packages/opencode/test/session/llm-native.test.ts— expanded coverage of the native + fallback matrix.packages/llm/example/call-sites.md,session/llm/AGENTS.md— doc alignment.Verification
llm-native+tool-repair: 26 pass ·llm-native-recorded: 3 pass / 1 skip ·packages/llmfocused: 11 passbun typecheck(opencode + llm): cleanopenai, anthropic, google, azure, bedrock, openrouter, ollama-compat, xai-apikey; fallbackxai-oauth, missing-key/baseURL0.0.0-m27-cloud-local-202607101055sha25627982c0746360791bc5db6b1a5b1d798df2270ba3db7f9a390b89fd676d3e495Part of umbrella milestone 27 (
docs/milestone-27-parallel.md).