File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,14 +11,22 @@ function createAgentCompletionAdapter(
1111 model : string ,
1212 effort : 'low' | 'medium' | 'xhigh' ,
1313) {
14+ // OVH's gpt-oss only supports the standard effort tiers (no OpenAI-only
15+ // `xhigh`), so clamp it down when targeting OVH.
16+ const ovhEffort = effort === 'xhigh' ? 'high' : effort ;
17+
1418 return new CompletionAdapterOpenAIResponses ( {
1519 openAiApiKey : openAiResponsesApiKey as string ,
1620 baseUrl : usesOvhAiEndpoints ? OVH_AI_ENDPOINTS_BASE_URL : undefined ,
1721 model : usesOvhAiEndpoints ? 'gpt-oss-120b' : model ,
22+ // OVH implements the standard Chat Completions API fully but only a strict
23+ // partial subset of the OpenAI-proprietary Responses API. Use Completions
24+ // for OVH and keep Responses for real OpenAI.
25+ useCompletionApi : usesOvhAiEndpoints ,
1826 extraRequestBodyParameters : {
1927 ...( usesOvhAiEndpoints ? { store : false } : { } ) ,
2028 reasoning : {
21- effort,
29+ effort : usesOvhAiEndpoints ? ovhEffort : effort ,
2230 } ,
2331 } ,
2432 } ) ;
You can’t perform that action at this time.
0 commit comments