File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,15 @@ export const createChatCompletions = async (
2222 [ "assistant" , "tool" ] . includes ( msg . role ) ,
2323 )
2424
25- // Check if model starts with "claude-" (should also be treated as agent)
25+ // Check if model starts with "claude-" or is "gpt-5-codex" (should also be treated as agent)
2626 const isClaudeModel = payload . model . startsWith ( "claude-" )
27+ const isGpt5Codex = payload . model === "gpt-5-codex"
2728
2829 // Build headers and add X-Initiator
2930 const headers : Record < string , string > = {
3031 ...copilotHeaders ( state , enableVision ) ,
31- "X-Initiator" : isAgentCall || isClaudeModel ? "agent" : "user" ,
32+ "X-Initiator" :
33+ isAgentCall || isClaudeModel || isGpt5Codex ? "agent" : "user" ,
3234 }
3335
3436 const response = await fetch ( `${ copilotBaseUrl ( state ) } /chat/completions` , {
You can’t perform that action at this time.
0 commit comments