Configure per-conversation session-affinity headers
Attach stable per-conversation session identifiers, such as UUID-based OpenCode headers, to outbound inference requests. Allow provider- and model-level control over header names, formats, and omission, together with related prompt-cache settings to improve routing and cache affinity.
Explore challenge
The problem
Attach stable per-conversation session identifiers, such as UUID-based OpenCode headers, to outbound inference requests. Allow provider- and model-level control over header names, formats, and omission, together with related prompt-cache settings to improve routing and cache affinity.
Start with these discussions
- Please send x-opencode-session header on API requests (OpenCode Go requires it from 09/05)github · ▲186 · 41 comments
- Poor prompt-cache hit rate on z.ai GLM Coding Plan: prefix is stable, hits still collapse (evidence + proposal to expose pi-ai session-affinity switches for the zai routes)github · ▲1 · 2 comments
- bug(llm-pi-ai): openai-responses 路由无法关闭 session_id 请求头github · ▲1 · 2 comments