added two new models - #18
Conversation
📝 WalkthroughWalkthroughTwo models, ChangesModel documentation coverage
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs.json`:
- Around line 137-138: Add backing MDX pages for the model slugs referenced in
docs.json: create api-reference/models/glm-5-2.mdx and
api-reference/models/deepseek-v4-flash.mdx using the repository’s existing
model-page structure and metadata conventions, so both navigation links resolve
successfully.
In `@docs/text-generation.mdx`:
- Line 259: Update the DeepSeek-V4-Flash description in the documentation to
hyphenate the compound modifier as “well-suited for analyzing,” leaving the
surrounding model details unchanged.
- Around line 204-250: Update the Chat Completions OpenAPI definition to match
the documented examples: add the request max_tokens property and define a
response-specific message schema containing reasoning and tool_calls with the
exact types and nullability shown. Apply the same alignment to the related
schema section referenced by the comment, rather than removing these fields from
the examples.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f45de434-1c47-4655-974b-2d7790203599
📒 Files selected for processing (4)
api-reference/openapi/zerogpu.openapi.jsondocs.jsondocs/model-catalog.mdxdocs/text-generation.mdx
| "api-reference/models/glm-5-2", | ||
| "api-reference/models/deepseek-v4-flash", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
for slug in glm-5-2 deepseek-v4-flash; do
echo "=== ${slug} ==="
fd -a -t f "${slug}" . || true
rg -n -F "api-reference/models/${slug}" . || true
doneRepository: zerogpu/docs
Length of output: 2158
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "=== files matching api-reference/models ==="
fd -a . 'api-reference' . || true
echo
echo "=== route/content files mentioning model slugs ==="
rg -n -S 'api-reference/models/(glm-5-2|deepseek-v4-flash)|glm-5-2|deepseek-v4-flash' docs . \
-g '!**/node_modules/**' -g '!**/.git/**' || true
echo
echo "=== docs.json around the referenced lines ==="
sed -n '120,155p' docs.jsonRepository: zerogpu/docs
Length of output: 18154
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
for slug in glm-5-2 deepseek-v4-flash; do
echo "=== $slug: matching files ==="
fd -a -t f "$slug" . || true
echo
done
echo "=== docs directory tree (shallow) ==="
find docs -maxdepth 3 \( -type d -o -type f \) | sort | sed -n '1,220p'
echo
echo "=== possible route/page definitions for api-reference/models ==="
rg -n -S 'api-reference/models|models/' docs . \
-g '!**/node_modules/**' -g '!**/.git/**' -g '!docs/model-catalog.mdx' -g '!docs/text-generation.mdx' || trueRepository: zerogpu/docs
Length of output: 17633
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "=== docs.json top-level structure ==="
python3 - <<'PY'
import json
from pathlib import Path
data = json.loads(Path("docs.json").read_text())
print(type(data).__name__)
if isinstance(data, dict):
print("top-level keys:", list(data.keys()))
for k in ("pages", "navigation", "navbar", "sidebar", "links"):
if k in data:
v = data[k]
print(f"{k}: {type(v).__name__}")
PY
echo
echo "=== docs.json excerpt around api-reference ==="
rg -n -C 4 '"api-reference"|glm-5-2|deepseek-v4-flash' docs.json || true
echo
echo "=== candidate source files for api-reference routes ==="
fd -a -t f 'api-reference' . || true
fd -a -t f 'models' docs . | sed -n '1,120p' || trueRepository: zerogpu/docs
Length of output: 1070
Add backing pages for these model links. docs.json:137-138 points to api-reference/models/glm-5-2 and api-reference/models/deepseek-v4-flash, but the repo has no matching api-reference/models/*.mdx files for either slug.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs.json` around lines 137 - 138, Add backing MDX pages for the model slugs
referenced in docs.json: create api-reference/models/glm-5-2.mdx and
api-reference/models/deepseek-v4-flash.mdx using the repository’s existing
model-page structure and metadata conventions, so both navigation links resolve
successfully.
| ```bash Chat Completions | ||
| curl https://api.zerogpu.ai/v1/chat/completions \ | ||
| -H "content-type: application/json" \ | ||
| -H "x-api-key: YOUR_API_KEY" \ | ||
| -d '{ | ||
| "model": "glm-5.2", | ||
| "messages": [ | ||
| { | ||
| "role": "system", | ||
| "content": "You are a precise code-review assistant. Be brief." | ||
| }, | ||
| { | ||
| "role": "user", | ||
| "content": "Review this function name: getUserDataAndSendEmailAndLog(). What does it tell you about the function, and how would you refactor it? 3 bullets max." | ||
| } | ||
| ], | ||
| "max_tokens": 800 | ||
| }' | ||
| ``` | ||
|
|
||
| The model reasons before it answers and returns the trace alongside the final text as a `reasoning` field on the message. | ||
|
|
||
| ```json Response | ||
| { | ||
| "id": "id-1784840133815", | ||
| "object": "chat.completion", | ||
| "created": 1784840133, | ||
| "model": "glm-5.2", | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "finish_reason": "stop", | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": "**1. The name confesses the crime** – \"And\" in a function name means it violates single responsibility: fetching, emailing, and logging are three separate concerns.\n\n**2. Split it** – Extract `getUserData()`, `sendEmail()`, and `logActivity()`, each independently testable and reusable.\n\n**3. Orchestrate at the edge** – If the sequence matters, compose them in a thin workflow function named for the *why* (e.g. `onUserSignup()`), not the *how*.", | ||
| "reasoning": "The name reveals the function does three unrelated things — fetch data, send email, log — a single-responsibility violation. Recommend splitting into three functions plus a thin orchestrator. Keep to 3 bullets.", | ||
| "tool_calls": [] | ||
| } | ||
| } | ||
| ], | ||
| "usage": { | ||
| "prompt_tokens": 58, | ||
| "completion_tokens": 151, | ||
| "total_tokens": 209 | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Align the OpenAPI contract with these examples.
Both samples use max_tokens and show message.reasoning/message.tool_calls, but the supplied Chat Completions schema documents none of those fields. Add the request property and a response-specific message schema (with exact field types/nullability), or remove them from the examples.
Also applies to: 263-309
🧰 Tools
🪛 Betterleaks (1.6.1)
[high] 205-207: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.
(curl-auth-header)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/text-generation.mdx` around lines 204 - 250, Update the Chat Completions
OpenAPI definition to match the documented examples: add the request max_tokens
property and define a response-specific message schema containing reasoning and
tool_calls with the exact types and nullability shown. Apply the same alignment
to the related schema section referenced by the comment, rather than removing
these fields from the examples.
| (`/v1/responses`) is not available for this model. | ||
| </Note> | ||
|
|
||
| > DeepSeek's DeepSeek-V4-Flash is an open-weight Mixture-of-Experts model built for efficient reasoning, coding, and agentic workflows, with 284B total parameters activating only 13B per token, served on ZeroGPU for general text generation. It sustains a 1,048,576-token (1M) context well suited for analyzing large codebases, long documents, extensive conversations, and complex research tasks, and supports fast non-thinking responses as well as higher-effort reasoning modes for planning, problem-solving, and multi-step automation. MIT-licensed with no usage restrictions. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Hyphenate the compound modifier.
Use “well-suited for analyzing” here.
🧰 Tools
🪛 LanguageTool
[grammar] ~259-~259: Use a hyphen to join words.
Context: ...ains a 1,048,576-token (1M) context well suited for analyzing large codebases, lo...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/text-generation.mdx` at line 259, Update the DeepSeek-V4-Flash
description in the documentation to hyphenate the compound modifier as
“well-suited for analyzing,” leaving the surrounding model details unchanged.
Source: Linters/SAST tools
Summary by CodeRabbit
New Features
glm-5.2anddeepseek-v4-flashmodels in Chat Completions.Documentation