fix: resolve gpt-5-codex streaming response issue (#10781)
* fix: resolve gpt-5-codex streaming response issue - Add patch for @opeoginni/github-copilot-openai-compatible to fix text part ID mismatch - Fix text-end event to use currentTextId instead of value.item.id for proper ID matching - Add COPILOT_DEFAULT_HEADERS to OpenAI client for GitHub Copilot compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * format code --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { loggerService } from '@logger'
|
||||
import { COPILOT_DEFAULT_HEADERS } from '@renderer/aiCore/provider/constants'
|
||||
import {
|
||||
isClaudeReasoningModel,
|
||||
isOpenAIReasoningModel,
|
||||
@@ -166,7 +167,8 @@ export abstract class OpenAIBaseClient<
|
||||
baseURL: this.getBaseURL(),
|
||||
defaultHeaders: {
|
||||
...this.defaultHeaders(),
|
||||
...this.provider.extra_headers
|
||||
...this.provider.extra_headers,
|
||||
...(this.provider.id === 'copilot' ? COPILOT_DEFAULT_HEADERS : {})
|
||||
}
|
||||
}) as TSdkInstance
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user