Skip to content

Open weight models 1 - #19

Merged
maddy-a merged 2 commits into
mainfrom
open-weight-models-1
Jul 28, 2026
Merged

Open weight models 1#19
maddy-a merged 2 commits into
mainfrom
open-weight-models-1

Conversation

@maddy-a

@maddy-a maddy-a commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added API reference documentation for the DeepSeek V4 Flash and GLM 5.2 models.
    • Added interactive API playgrounds for both models through the Chat Completions endpoint.
    • Documented authentication, request formats, example responses, supported headers, and common error responses.
    • Clarified that both models support /v1/chat/completions; the Responses endpoint is unavailable.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds model reference pages and dedicated authenticated OpenAPI playground specifications for deepseek-v4-flash and glm-5.2, both exposing only the Chat Completions API.

Changes

Model playground documentation

Layer / File(s) Summary
DeepSeek-V4-Flash playground and documentation
api-reference/openapi/playgrounds/deepseek-v4-flash.openapi.json, api-reference/models/deepseek-v4-flash.mdx
Adds the authenticated /chat/completions contract, request and response schemas, examples, error responses, and model documentation with API availability notes and references.
GLM-5.2 playground and documentation
api-reference/openapi/playgrounds/glm-5_2.openapi.json, api-reference/models/glm-5-2.mdx
Adds the authenticated /chat/completions contract, request and response schemas, examples, error responses, and model documentation with API availability notes and references.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ChatCompletionsAPI
  participant Model
  Client->>ChatCompletionsAPI: POST /v1/chat/completions with x-api-key and model
  ChatCompletionsAPI->>Model: Process chat completion request
  Model-->>ChatCompletionsAPI: Return completion response
  ChatCompletionsAPI-->>Client: Return 200 or documented error response
Loading

Possibly related PRs

  • zerogpu/docs#15: Defines the optional x-project-id header on related Chat Completions operations.
  • zerogpu/docs#18: Extends the shared model schema for glm-5.2 and deepseek-v4-flash.

Suggested labels: documentation

Suggested reviewers: amaan-ai20

Poem

I’m a rabbit with docs in my den,
Two new model paths now greet the pen.
Chat completions hop through the night,
With schemas and keys aligned just right.
/v1/chat/completions—what a delightful sight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the change theme: documentation and playground specs for open-weight models.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch open-weight-models-1

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@api-reference/models/glm-5-2.mdx`:
- Around line 4-14: Update the GLM-5.2 page’s description and model overview to
remove or qualify the claims about function calling and batch tasks unless the
linked OpenAPI playground is expanded to expose those contracts. Keep the
advertised capabilities consistent with the Chat Completions schema referenced
by the page, including its lack of tools, tool_choice, tool messages, and
tool_call_id support.

In `@api-reference/openapi/playgrounds/deepseek-v4-flash.openapi.json`:
- Line 6: Update the description in the deepseek-v4-flash playground OpenAPI
definition to match the examples declared under the request-example
configuration: either remove the claim that the selector supports JSON, NER, and
PII workflows, or add corresponding example entries alongside default.
🪄 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: 911d6fee-f74d-4a29-929b-d75f2567b63e

📥 Commits

Reviewing files that changed from the base of the PR and between 675e077 and ce0ff24.

📒 Files selected for processing (4)
  • api-reference/models/deepseek-v4-flash.mdx
  • api-reference/models/glm-5-2.mdx
  • api-reference/openapi/playgrounds/deepseek-v4-flash.openapi.json
  • api-reference/openapi/playgrounds/glm-5_2.openapi.json

Comment on lines +4 to +14
description: "Model details for glm-5.2. Reasoning, function calling, and batch tasks with a 1M-token context window."
openapi: "api-reference/openapi/playgrounds/glm-5_2.openapi.json POST /chat/completions"
---

<Note>
This model supports the Chat Completions API only. Send requests to
`/v1/chat/completions` — the Responses endpoint (`/v1/responses`) is not
available for this model.
</Note>

> Z.ai's GLM-5.2 is an open-weight Mixture-of-Experts flagship built for long-horizon tasks, with 753B total parameters activating 8 of 256 experts per token, served on ZeroGPU for general text generation. It sustains a solid 1,048,576-token (1M) context, reasons through a problem with flexible thinking effort before answering, and supports function calling and batch tasks. MIT-licensed with no usage restrictions. When the work spans entire repos, day-long agent sessions, or million-token documents, this is the model.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not advertise API capabilities this page cannot expose.

Lines 4 and 14 promise function calling and batch tasks, but the linked playground defines only Chat Completions; it also lacks tools, tool_choice, tool messages, and tool_call_id. Add the supported tool-calling/Batch API contracts, or remove/qualify these claims to avoid sending users to unsupported flows.

🤖 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 `@api-reference/models/glm-5-2.mdx` around lines 4 - 14, Update the GLM-5.2
page’s description and model overview to remove or qualify the claims about
function calling and batch tasks unless the linked OpenAPI playground is
expanded to expose those contracts. Keep the advertised capabilities consistent
with the Chat Completions schema referenced by the page, including its lack of
tools, tool_choice, tool messages, and tool_call_id support.

"info": {
"title": "deepseek-v4-flash playground",
"version": "1.0",
"description": "Interactive playground for **deepseek-v4-flash**.\nModel is always `deepseek-v4-flash` on this page (shown in the form, not editable).\nUse the **request example** selector to switch use cases (JSON, NER, PII, etc.).\nAuthentication: `x-api-key` (required) and `x-project-id` (optional)."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the request-example guidance match the available examples.

Lines 61-79 define only default, so the selector cannot offer the advertised JSON, NER, or PII workflows. Remove that claim or add the corresponding examples.

🤖 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 `@api-reference/openapi/playgrounds/deepseek-v4-flash.openapi.json` at line 6,
Update the description in the deepseek-v4-flash playground OpenAPI definition to
match the examples declared under the request-example configuration: either
remove the claim that the selector supports JSON, NER, and PII workflows, or add
corresponding example entries alongside default.

@maddy-a
maddy-a merged commit 84e9ac5 into main Jul 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant