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.
This commit is contained in:
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user