Skip to content

Commit 974363d

Browse files
committed
dev-demo: correct ovh setup
AdminForth/1775/agent-doesnt-work-with-ovh-and
1 parent f208737 commit 974363d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

dev-demo/globalPlugins.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)