File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,13 @@ export const createChatCompletions = async (
2222 [ "assistant" , "tool" ] . includes ( msg . role ) ,
2323 )
2424
25- // Check if model is claude-sonnet-4.5 (should also be treated as agent)
26- const isClaudeSonnet45 = payload . model === "claude-sonnet-4.5"
25+ // Check if model starts with " claude-" (should also be treated as agent)
26+ const isClaudeModel = payload . model . startsWith ( "claude-" )
2727
2828 // Build headers and add X-Initiator
2929 const headers : Record < string , string > = {
3030 ...copilotHeaders ( state , enableVision ) ,
31- "X-Initiator" : isAgentCall || isClaudeSonnet45 ? "agent" : "user" ,
31+ "X-Initiator" : isAgentCall || isClaudeModel ? "agent" : "user" ,
3232 }
3333
3434 const response = await fetch ( `${ copilotBaseUrl ( state ) } /chat/completions` , {
You can’t perform that action at this time.
0 commit comments