-
Notifications
You must be signed in to change notification settings - Fork 1
Add glm-5.2 and deepseek-v4-flash to chat #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,11 +78,28 @@ describe("computeCallSavings", () => { | |
| }); | ||
|
|
||
| it("falls back to a default ZeroGPU rate for an unknown model", () => { | ||
| const known = computeCallSavings(740, 280, "claude-opus-4-8", "qwen3-30b-a3b-fp8").savingsUsd; | ||
| const known = computeCallSavings(740, 280, "claude-opus-4-8", "glm-5.2").savingsUsd; | ||
| const unknown = computeCallSavings(740, 280, "claude-opus-4-8", "some-new-zgpu-model").savingsUsd; | ||
| // fallback equals the priciest published rate, qwen3's {0.05, 0.3} | ||
| // fallback equals the priciest published rate, glm-5.2's {1.10, 3.50} | ||
| expect(unknown).toBeCloseTo(known, 10); | ||
| }); | ||
|
|
||
| it("never overstates savings for an unknown model", () => { | ||
| // The fallback must be at least as dear as every listed model, so an | ||
| // unlisted id can only ever under-report what was saved. | ||
| const unknown = computeCallSavings(740, 280, "claude-opus-4-8", "some-new-zgpu-model").savingsUsd; | ||
| for (const model of [ | ||
| "gpt-oss-120b", | ||
| "qwen3-30b-a3b-fp8", | ||
| "glm-5.2", | ||
| "deepseek-v4-flash", | ||
| "LFM2.5-1.2B-Instruct", | ||
| ]) { | ||
| expect(unknown).toBeLessThanOrEqual( | ||
| computeCallSavings(740, 280, "claude-opus-4-8", model).savingsUsd, | ||
| ); | ||
| } | ||
| }); | ||
|
Comment on lines
+87
to
+102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Check every priced model, not a hand-picked subset. The test claims the fallback never overstates savings for every listed model, but it only enumerates five IDs. Iterate over all 🤖 Prompt for AI Agents |
||
| }); | ||
|
|
||
| describe("resolveBaselineModel", () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: zerogpu/cli
Length of output: 10132
🌐 Web query:
ZeroGPU chat Completions model deepseek-v4-flash API model_not_found💡 Result:
The error model_not_found when using deepseek-v4-flash is likely occurring because the legacy API aliases deepseek-chat and deepseek-reasoner were officially retired on July 24, 2026 [1][2][3]. If your application or SDK is still configured to use the retired aliases, or if it is attempting to access a model ID that is not supported by your specific provider, you will receive this error [2][4]. To resolve this: 1. Update your code: Ensure you are explicitly using the model ID deepseek-v4-flash (or deepseek-v4-pro) in your API request, rather than any older identifiers [5][6][7]. 2. Verify your provider: If you are using a third-party API provider (e.g., OpenRouter, Together AI, etc.) instead of the official DeepSeek API, check their documentation for the correct model slug [4][8]. Third-party providers often require their own naming conventions, such as deepseek/deepseek-v4-flash or deepseek-ai/DeepSeek-V4-Flash [4][8]. 3. Check Base URL: Ensure your base_url is set correctly for your provider [7][4]. ZeroGPU (an infrastructure company) is distinct from the official DeepSeek API platform [9][10][7]. If you are using services via ZeroGPU or a similar third-party platform, verify that they currently support the DeepSeek V4 model family, as model availability can vary between providers [4].
Citations:
🌐 Web query:
"api.zerogpu.ai/v1/chat/completions" "deepseek-v4-flash"💡 Result:
The endpoint api.zerogpu.ai/v1/chat/completions is a valid REST API endpoint provided by the ZeroGPU platform for model inference [1][2]. Regarding your query for deepseek-v4-flash: 1. ZeroGPU provides a generic API structure for chat completions [2]. You can access various models through this endpoint by specifying the model name in your request body [1][3]. 2. DeepSeek-V4-Flash is a real, high-performance Mixture-of-Experts (MoE) language model released by DeepSeek-AI in April 2026 [4][5][6]. It features 284 billion total parameters (13 billion activated) and supports a 1 million token context window [4][5][6]. 3. While DeepSeek-V4-Flash is available through multiple inference providers [7], you should verify if it is currently listed in the specific ZeroGPU model catalog via their documentation or dashboard [1][3]. If supported, you would typically integrate it by setting the model parameter to "deepseek-v4-flash" (or the provider-specific canonical ID) within the JSON payload of a POST request to the aforementioned endpoint, while ensuring the required x-api-key and x-project-id headers are included [3][8][9]. For exact usage, refer to the official ZeroGPU API documentation at https://docs.zerogpu.ai [1][3].
Citations:
🌐 Web query:
"model_not_found" "deepseek-v4-flash" ZeroGPU💡 Result:
The error model_not_found related to deepseek-v4-flash and ZeroGPU typically arises from two distinct issues: the recent retirement of legacy DeepSeek model aliases or incorrect model identifier formatting in your API request [1][2][3]. 1. Legacy Model Retirement: As of July 24, 2026, the legacy model aliases deepseek-chat and deepseek-reasoner have been fully retired [4][2][5]. If your application was using these identifiers, it will now return a model_not_found error [1][4][2]. You must update your configuration to use the explicit model IDs: deepseek-v4-flash (for non-thinking/standard workflows) or deepseek-v4-pro (for advanced reasoning/agentic tasks) [4][2][5]. 2. API Formatting and Provider Routing: If you are using an API aggregator (such as OpenRouter) or a specific integration library (like openclaw or similar), the model_not_found error often occurs due to incorrect prefixing or double-encoding of the model ID [6]. For example, if your code incorrectly sends a request formatted as openrouter/openrouter/deepseek-v4-flash, the gateway may fail to resolve the model name [6]. Ensure you are using the canonical model ID format required by your specific provider [6][7]. 3. ZeroGPU Specific Context: If you are encountering this within a Hugging Face Space using ZeroGPU, be aware that the error might be a generic wrapper response [8][9]. ZeroGPU environments often use custom decorators (like
@spaces.GPU) that can swallow detailed error messages [9]. If the model is correctly referenced but fails to load, ensure you are not hitting environmental constraints (e.g., storage limits or transient worker failures) and verify the model ID is explicitly supported by the API client you are using inside the GPU-decorated function [8][3][10]. To resolve: - Update all references from deepseek-chat or deepseek-reasoner to deepseek-v4-flash [1][4][2]. - Audit your API call configuration to ensure no redundant provider prefixes (e.g., openrouter/openrouter/) are being added [6]. - If using ZeroGPU, check your application logs specifically for storage or initialization errors that might be masked by the generic model_not_found message [8][10].Citations:
🌐 Web query:
site:docs.zerogpu.ai "deepseek-v4-flash"💡 Result:
As of July 29, 2026, deepseek-v4-flash is a model available through the official DeepSeek API [1][2]. It is listed alongside deepseek-v4-pro in the DeepSeek API documentation, which utilizes an API format compatible with OpenAI and Anthropic standards [1][2]. Users can access this model by configuring their requests to point to the DeepSeek API base URL [1][2].
Citations:
Delay exposing
deepseek-v4-flashuntil the ZeroGPU Chat Completions endpoint supports it. The CLI allowlist makes model--model deepseek-v4-flashselectable, but the current ZeroGPU Chat Completions request returns404 model_not_found, while all docs present it as live.src/commands/chat.ts#L23-L29: remove the model or gate it behind availability.README.md#L142,README.md#L158-L160,docs/DOCUMENTATION.md#L8,docs/DOCUMENTATION.md#L212-L215,docs/DOCUMENTATION.md#L685, anddocs/ADDING_COMMANDS.md#L10: remove or clearly mark these unavailable or gated references.📍 Affects 4 files
src/commands/chat.ts#L23-L29(this comment)README.md#L141-L142README.md#L157-L160docs/DOCUMENTATION.md#L8-L8docs/DOCUMENTATION.md#L212-L215docs/DOCUMENTATION.md#L685-L685docs/ADDING_COMMANDS.md#L10-L10🤖 Prompt for AI Agents