fix(ai,coding-agent): support anthropic-style cache control for openai compatibles closes #3392
This commit is contained in:
@@ -374,7 +374,7 @@ describe("ModelRegistry", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("compat schema accepts reasoningEffortMap and supportsStrictMode", () => {
|
||||
test("compat schema accepts reasoningEffortMap, supportsStrictMode, and cacheControlFormat", () => {
|
||||
writeRawModelsJson({
|
||||
demo: {
|
||||
baseUrl: "https://example.com/v1",
|
||||
@@ -394,6 +394,7 @@ describe("ModelRegistry", () => {
|
||||
high: "max",
|
||||
},
|
||||
supportsStrictMode: false,
|
||||
cacheControlFormat: "anthropic",
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -406,6 +407,7 @@ describe("ModelRegistry", () => {
|
||||
expect(registry.getError()).toBeUndefined();
|
||||
expect(compat?.reasoningEffortMap).toEqual({ minimal: "default", high: "max" });
|
||||
expect(compat?.supportsStrictMode).toBe(false);
|
||||
expect(compat?.cacheControlFormat).toBe("anthropic");
|
||||
});
|
||||
|
||||
test("model-level baseUrl overrides provider-level baseUrl for custom models", () => {
|
||||
|
||||
Reference in New Issue
Block a user