Commit Graph

4 Commits

Author SHA1 Message Date
Zhiyuan Zheng 890a737d1e fix(chat-headers): skip x-initiator override for @ai-sdk/github-copilot models
OpenCode's copilot fetch wrapper already sets x-initiator based on the
actual HTTP request body content. When oh-my-opencode's chat.headers
hook overrides it with 'agent', the Copilot API detects a mismatch
between the header and the request body and rejects the request with
'invalid initiator'.

This matches the approach OpenCode's own chat.headers handler uses
(copilot.ts:314) — it explicitly skips @ai-sdk/github-copilot models
because the fetch wrapper handles x-initiator correctly on its own.
2026-02-26 12:38:05 +08:00
YeonGyu-Kim cd5e071eda fix(chat-headers): cache internal marker lookups to prevent N+1 API calls
- BUG-4: Add in-memory cache for hasInternalMarker() results with 1000-entry limit
- Eliminates redundant session.message API calls for copilot marker detection
2026-02-21 02:41:46 +09:00
Maxim Harizanov a85f7efb1d fix(copilot): keep notifications visible and detect marker via message lookup 2026-02-19 13:17:02 +02:00
Maxim Harizanov 64e8e164aa fix(copilot): mark internal background notifications as agent-initiated 2026-02-19 13:17:02 +02:00