Skip to content

feat(providers): send stable x-opencode-session to OpenCode Go gateway - #615

Open
miaowmint wants to merge 1 commit into
TencentCloud:developfrom
miaowmint:feat/opencode-go-session
Open

feat(providers): send stable x-opencode-session to OpenCode Go gateway#615
miaowmint wants to merge 1 commit into
TencentCloud:developfrom
miaowmint:feat/opencode-go-session

Conversation

@miaowmint

Copy link
Copy Markdown
Contributor

OpenCode Go (https://opencode.ai/zen/go) rejects chat requests without a stable x-opencode-session header with HTTP 400 MissingSessionID.

  • new opencode_session helper: gateway URL detection + case-insensitive header injection (user-supplied values always win)
  • chat runtime (ProviderStore.build_harness_configs): assign one UUID per provider and persist it in the provider row so it survives restarts
  • probes / model listing: throwaway UUID per invocation (each probe is its own conversation)
  • 17 unit tests covering URL matching, injection semantics, probe path and store persistence

Summary

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (release/* or hotfix/* only)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore
  • Release / hotfix

Test plan

  • make all passes locally
  • Added/updated tests

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)

OpenCode Go (https://opencode.ai/zen/go) rejects chat requests without a
stable x-opencode-session header with HTTP 400 MissingSessionID.

- new opencode_session helper: gateway URL detection + case-insensitive
  header injection (user-supplied values always win)
- chat runtime (ProviderStore.build_harness_configs): assign one UUID per
  provider and persist it in the provider row so it survives restarts
- probes / model listing: throwaway UUID per invocation (each probe is
  its own conversation)
- 17 unit tests covering URL matching, injection semantics, probe path
  and store persistence
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.

1 participant