From bf1faf88426ef1b2b05fa03fed98b24dde85b59c Mon Sep 17 00:00:00 2001 From: can1357 Date: Thu, 30 Apr 2026 05:35:00 +0200 Subject: [PATCH] test(coding-agent): drop api filter from getOpenAICompat fixture helper The helper guarded `model.api === "openai-completions"` and returned undefined for openai-responses models. The discoverable-custom-compat test sets `api: "openai-responses"` on a custom model with `compat.extraBody`, so the post-refresh assertion saw `undefined` instead of the configured proxy hint. The OpenAICompatSchema gates user-facing custom-model compat regardless of the underlying api wire format, so reading the field as OpenAICompat for any api matches what the registry actually stores. --- packages/coding-agent/test/model-registry.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/coding-agent/test/model-registry.test.ts b/packages/coding-agent/test/model-registry.test.ts index f1d7420f5..318582065 100644 --- a/packages/coding-agent/test/model-registry.test.ts +++ b/packages/coding-agent/test/model-registry.test.ts @@ -94,7 +94,10 @@ describe("ModelRegistry", () => { } function getOpenAICompat(model: Model | undefined): OpenAICompat | undefined { - return model?.api === "openai-completions" ? (model.compat as OpenAICompat | undefined) : undefined; + // All custom-model compat overrides flow through OpenAICompatSchema regardless of + // the underlying api ("openai-completions" vs "openai-responses"), so we can read + // the field for any model in this fixture. + return model?.compat as OpenAICompat | undefined; } /** Create a baseUrl-only override (no custom models) */