Skip to content

Add native OpenAI runtime opt-in#26947

Draft
kitlangton wants to merge 6 commits into
llm-native-prepare-testsfrom
llm-native-runtime-openai
Draft

Add native OpenAI runtime opt-in#26947
kitlangton wants to merge 6 commits into
llm-native-prepare-testsfrom
llm-native-runtime-openai

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

@kitlangton kitlangton commented May 11, 2026

Summary

  • add OPENCODE_LLM_RUNTIME=native as an experimental session runtime selector
  • route no-tools OpenAI requests through native @opencode-ai/llm streaming while keeping AI SDK as the default
  • carry opencode provider auth/base URL/headers into native requests and cover the path with a local mocked OpenAI Responses stream test

Notes

  • native runtime is intentionally limited to OpenAI no-tools for this first slice
  • tool-enabled requests fail clearly instead of falling back silently

Test Plan

  • bun run test -- test/session/llm-native.test.ts test/session/llm.test.ts --test-name-pattern native
  • bun typecheck
  • bunx oxlint packages/opencode/src/session/llm.ts packages/opencode/src/session/llm-native.ts packages/opencode/test/session/llm.test.ts packages/opencode/test/session/llm-native.test.ts
  • git diff --check

Stack

  1. Consume native LLM events in session processing #26639
  2. Add native LLM request adapter #26941
  3. Compile native LLM requests in session tests #26946
  4. Add native OpenAI runtime opt-in #26947 👈 current

@kitlangton kitlangton marked this pull request as draft May 11, 2026 21:44
@kitlangton kitlangton force-pushed the llm-native-runtime-openai branch from a929e42 to cfee788 Compare May 11, 2026 22:06
@kitlangton kitlangton force-pushed the llm-native-prepare-tests branch 2 times, most recently from b93cb0e to 3c7ba1d Compare May 11, 2026 22:07
@kitlangton kitlangton force-pushed the llm-native-runtime-openai branch from cfee788 to b262618 Compare May 11, 2026 22:07
@kitlangton kitlangton force-pushed the llm-native-runtime-openai branch from bc57de3 to b8eca31 Compare May 12, 2026 00:11
@kitlangton kitlangton force-pushed the llm-native-prepare-tests branch from 3c7ba1d to 7b82011 Compare May 12, 2026 01:32
@kitlangton kitlangton force-pushed the llm-native-runtime-openai branch from b8eca31 to 862f280 Compare May 12, 2026 01:33
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