adjust azure responses metadata and handoff gating

This commit is contained in:
Markus Ylisiurunen 2026-01-22 21:00:18 +02:00 committed by Mario Zechner
parent bd7049b7d1
commit c6e966bd1c
3 changed files with 10 additions and 3 deletions

View file

@ -28,6 +28,7 @@ import { beforeAll, describe, expect, it } from "vitest";
import { getModel } from "../src/models.js";
import { completeSimple, getEnvApiKey } from "../src/stream.js";
import type { Api, AssistantMessage, Message, Model, Tool, ToolResultMessage } from "../src/types.js";
import { hasAzureOpenAICredentials } from "./azure-utils.js";
import { resolveApiKey } from "./oauth.js";
// Simple tool for testing
@ -121,6 +122,9 @@ async function getApiKey(provider: string): Promise<string | undefined> {
* Synchronous check for API key availability (env vars only, for skipIf)
*/
function hasApiKey(provider: string): boolean {
if (provider === "azure-openai-responses") {
return hasAzureOpenAICredentials();
}
return !!getEnvApiKey(provider);
}