Skip to content

fix(llm): preserve native continuation metadata - #28678

Merged
kitlangton merged 2 commits into
devfrom
fix/native-llm-continuation
May 21, 2026
Merged

kitlangton merged 2 commits into
devfrom
fix/native-llm-continuation

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Summary

  • preserve provider-owned reasoning metadata through native opencode request lowering
  • support OpenAI Responses encrypted reasoning continuation while avoiding non-persisted rs_* ids with store:false
  • add Anthropic user image continuation lowering and shared media helpers
  • move golden recorded scenarios onto a small generated-conversation DSL and add a focused OpenAI reasoning-continuation cassette

Verification

  • bunx prettier --write packages/llm/src/protocols/anthropic-messages.ts packages/llm/src/protocols/openai-responses.ts packages/llm/src/protocols/shared.ts packages/llm/test/continuation-scenarios.ts packages/llm/test/provider/anthropic-messages.test.ts packages/llm/test/provider/golden.recorded.test.ts packages/llm/test/provider/openai-responses.test.ts packages/llm/test/recorded-golden.ts packages/llm/test/recorded-scenarios.ts packages/opencode/src/session/llm/native-request.ts packages/opencode/test/session/llm-native.test.ts
  • git diff --check
  • bunx oxlint packages/llm/src/protocols/anthropic-messages.ts packages/llm/src/protocols/openai-responses.ts packages/llm/src/protocols/shared.ts packages/llm/test/continuation-scenarios.ts packages/llm/test/provider/anthropic-messages.test.ts packages/llm/test/provider/golden.recorded.test.ts packages/llm/test/provider/openai-responses.test.ts packages/llm/test/recorded-golden.ts packages/llm/test/recorded-scenarios.ts packages/opencode/src/session/llm/native-request.ts packages/opencode/test/session/llm-native.test.ts (known pre-existing warnings in anthropic/opencode test files)
  • bun typecheck (packages/llm)
  • bun typecheck (packages/opencode)
  • bun test --timeout 5000 test/provider/openai-responses.test.ts (packages/llm)
  • bun test --timeout 5000 test/provider/anthropic-messages.test.ts (packages/llm)
  • bun test --timeout 5000 test/provider/golden.recorded.test.ts (packages/llm)
  • bun test --timeout 5000 test/session/llm-native.test.ts (packages/opencode)
  • RECORD=true RECORDED_TEST=reasoning-continuation bun test --timeout 120000 test/provider/golden.recorded.test.ts (packages/llm)
  • pre-push hook: bun turbo typecheck

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