mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 13:53:48 +00:00
Sent strict tool schemas only to providers that enforce them
This commit is contained in:
6 files changed
+239
-13
No files matched your search
@@ -168,6 +168,16 @@ public sealed class ProviderOpenAI() : BaseProvider(LLMProviders.OPEN_AI, new Ur
|
||||
},
|
||||
systemPromptRole: systemPromptRole,
|
||||
requestPath: "chat/completions",
|
||||
|
||||
//
|
||||
// OpenAI binds a strict function's arguments to its schema -- read on
|
||||
// 2026-09-24 at https://developers.openai.com/api/docs/guides/function-calling.
|
||||
// Most other hosts of this API do not: Groq applies strict mode to
|
||||
// response formats only (https://console.groq.com/docs/structured-outputs,
|
||||
// same day) and merely validates a tool call afterward, so it rejects
|
||||
// every call that leaves out an argument the strict schema requires:
|
||||
//
|
||||
enforcesStrictToolSchemas: true,
|
||||
token: token))
|
||||
yield return content;
|
||||
|
||||
|
||||
Reference in new issue
Block a user