mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 00:00:27 +00:00
feat(ai): add strictResponsesPairing for Azure OpenAI Responses API
Split OpenAICompat into OpenAICompletionsCompat and OpenAIResponsesCompat for type-safe API-specific compat settings. Added strictResponsesPairing option to suppress orphaned reasoning/tool calls on incomplete turns, fixing 400 errors on Azure's Responses API which requires strict pairing. Closes #768
This commit is contained in:
parent
def9e4e9a9
commit
d43930c818
17 changed files with 112 additions and 23 deletions
|
|
@ -51,8 +51,10 @@ describe.skipIf(!process.env.OPENAI_API_KEY)("xhigh reasoning", () => {
|
|||
});
|
||||
|
||||
it("should error with openai-completions when using xhigh", async () => {
|
||||
const { compat: _compat, ...baseModel } = getModel("openai", "gpt-5-mini");
|
||||
void _compat;
|
||||
const model: Model<"openai-completions"> = {
|
||||
...getModel("openai", "gpt-5-mini"),
|
||||
...baseModel,
|
||||
api: "openai-completions",
|
||||
};
|
||||
const s = stream(model, makeContext(), { reasoningEffort: "xhigh" });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue