@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed DeepSeek V4 Flash `xhigh` thinking support so requests preserve `xhigh` and map it to DeepSeek's `max` reasoning effort ([#3944](https://github.com/badlogic/pi-mono/issues/3944)).
|
||||||
- Fixed Anthropic streams that end before `message_stop` to be treated as errors instead of successful partial responses ([#3936](https://github.com/badlogic/pi-mono/issues/3936)).
|
- Fixed Anthropic streams that end before `message_stop` to be treated as errors instead of successful partial responses ([#3936](https://github.com/badlogic/pi-mono/issues/3936)).
|
||||||
- Fixed generated OpenAI-compatible DeepSeek V4 models to carry the provider-specific reasoning effort mapping outside the direct DeepSeek provider ([#3940](https://github.com/badlogic/pi-mono/issues/3940)).
|
- Fixed generated OpenAI-compatible DeepSeek V4 models to carry the provider-specific reasoning effort mapping outside the direct DeepSeek provider ([#3940](https://github.com/badlogic/pi-mono/issues/3940)).
|
||||||
- Fixed DeepSeek V4 Flash and V4 Pro pricing metadata to match current official rates ([#3910](https://github.com/badlogic/pi-mono/issues/3910)).
|
- Fixed DeepSeek V4 Flash and V4 Pro pricing metadata to match current official rates ([#3910](https://github.com/badlogic/pi-mono/issues/3910)).
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage
|
|||||||
*
|
*
|
||||||
* Supported today:
|
* Supported today:
|
||||||
* - GPT-5.2 / GPT-5.3 / GPT-5.4 / GPT-5.5 model families
|
* - GPT-5.2 / GPT-5.3 / GPT-5.4 / GPT-5.5 model families
|
||||||
* - DeepSeek V4 Pro
|
* - DeepSeek V4 Pro and Flash
|
||||||
* - Opus 4.6+ models (xhigh maps to adaptive effort "max" on Anthropic-compatible providers)
|
* - Opus 4.6+ models (xhigh maps to adaptive effort "max" on Anthropic-compatible providers)
|
||||||
*/
|
*/
|
||||||
export function supportsXhigh<TApi extends Api>(model: Model<TApi>): boolean {
|
export function supportsXhigh<TApi extends Api>(model: Model<TApi>): boolean {
|
||||||
@@ -59,7 +59,8 @@ export function supportsXhigh<TApi extends Api>(model: Model<TApi>): boolean {
|
|||||||
model.id.includes("gpt-5.3") ||
|
model.id.includes("gpt-5.3") ||
|
||||||
model.id.includes("gpt-5.4") ||
|
model.id.includes("gpt-5.4") ||
|
||||||
model.id.includes("gpt-5.5") ||
|
model.id.includes("gpt-5.5") ||
|
||||||
model.id.includes("deepseek-v4-pro")
|
model.id.includes("deepseek-v4-pro") ||
|
||||||
|
model.id.includes("deepseek-v4-flash")
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,24 @@ describe("supportsXhigh", () => {
|
|||||||
expect(supportsXhigh(model!)).toBe(true);
|
expect(supportsXhigh(model!)).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("returns true for DeepSeek V4 Flash on the DeepSeek provider", () => {
|
||||||
|
const model = getModel("deepseek", "deepseek-v4-flash");
|
||||||
|
expect(model).toBeDefined();
|
||||||
|
expect(supportsXhigh(model!)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("returns true for DeepSeek V4 Flash on opencode-go", () => {
|
||||||
|
const model = getModel("opencode-go", "deepseek-v4-flash");
|
||||||
|
expect(model).toBeDefined();
|
||||||
|
expect(supportsXhigh(model!)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("returns true for DeepSeek V4 Flash on OpenRouter", () => {
|
||||||
|
const model = getModel("openrouter", "deepseek/deepseek-v4-flash");
|
||||||
|
expect(model).toBeDefined();
|
||||||
|
expect(supportsXhigh(model!)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
it("returns true for OpenRouter Opus 4.6 (openai-completions API)", () => {
|
it("returns true for OpenRouter Opus 4.6 (openai-completions API)", () => {
|
||||||
const model = getModel("openrouter", "anthropic/claude-opus-4.6");
|
const model = getModel("openrouter", "anthropic/claude-opus-4.6");
|
||||||
expect(model).toBeDefined();
|
expect(model).toBeDefined();
|
||||||
|
|||||||
Reference in New Issue
Block a user