@@ -10,14 +10,20 @@ export const GROK_SESSION_ID_OPTION = "grokSessionId";
1010// Spread xAI quirks and remap only host option keys. Config still writes
1111// grokUserId / grokSessionId / reasoning_effort; wrapping buildRequest to
1212// alias those would hide the mismatch instead of baking the host names.
13- export const createGrokResponsesAdapter : AdapterFactory = responsesAdapterFactory ( {
14- ...xaiResponsesQuirks ,
15- sessionIdOption : GROK_SESSION_ID_OPTION ,
16- headers : {
17- ...xaiResponsesQuirks . headers ,
18- fromOption : ( xaiResponsesQuirks . headers ?. fromOption ?? [ ] ) . map ( ( entry ) =>
19- entry . optionKey === XAI_USER_ID_OPTION ? { ...entry , optionKey : GROK_USER_ID_OPTION } : entry ,
20- ) ,
21- } ,
22- reasoning : { ...xaiResponsesQuirks . reasoning , effortOption : "reasoning_effort" } ,
23- } ) ;
13+ export const createGrokResponsesAdapter : AdapterFactory =
14+ responsesAdapterFactory ( {
15+ ...xaiResponsesQuirks ,
16+ sessionIdOption : GROK_SESSION_ID_OPTION ,
17+ headers : {
18+ ...xaiResponsesQuirks . headers ,
19+ fromOption : ( xaiResponsesQuirks . headers ?. fromOption ?? [ ] ) . map ( ( entry ) =>
20+ entry . optionKey === XAI_USER_ID_OPTION
21+ ? { ...entry , optionKey : GROK_USER_ID_OPTION }
22+ : entry ,
23+ ) ,
24+ } ,
25+ reasoning : {
26+ ...xaiResponsesQuirks . reasoning ,
27+ effortOption : "reasoning_effort" ,
28+ } ,
29+ } ) ;
0 commit comments