Skip to content

fix: reuse authenticated OpenCode client transport#175

Open
catan271 wants to merge 1 commit into
tickernelz:mainfrom
catan271:fix/use-authenticated-plugin-client
Open

fix: reuse authenticated OpenCode client transport#175
catan271 wants to merge 1 commit into
tickernelz:mainfrom
catan271:fix/use-authenticated-plugin-client

Conversation

@catan271

Copy link
Copy Markdown

Summary

  • Reuse the OpenCode host SDK transport, including custom fetch and headers, when creating the v2 client.
  • Prefer the authenticated SDK session methods for structured output when available.
  • Retain the raw HTTP fallback for older SDK builds.
  • Add regression coverage for host headers and response content types.

Validation

  • bun test tests/opencode-provider.test.ts tests/plugin-host-config.test.ts
  • bun run typecheck
  • bunx prettier --check src/index.ts src/services/ai/opencode-host-config.ts src/services/ai/opencode-provider.ts src/services/ai/opencode-sdk-client.ts tests/opencode-provider.test.ts tests/plugin-host-config.test.ts

Closes #174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] opencodeProvider fails with password-protected OpenCode server

1 participant