Skip to content

docs(models): document json_schema 400 on deepseek-v4-flash and tool-name 400 - #117

Merged
sre-helmcode merged 2 commits into
mainfrom
docs/deepseek-no-json-schema
Sep 29, 2026
Merged

sre-helmcode merged 2 commits into
mainfrom
docs/deepseek-no-json-schema

Conversation

@sre-helmcode

Copy link
Copy Markdown
Contributor

What

  • Model card, deepseek-v4-flash (EN src/content/docs/models.mdx, ES src/content/docs-es/models.mdx): the description and capability list now state that response_format json_object is supported, json_schema is not and is rejected with a 400, and that schema-constrained output should use qwen3.6 or gemma4.
  • src/data/openapi.json:
    • ResponseFormat.description: json_schema works on qwen3.6 and gemma4; on deepseek-v4-flash it is rejected with a 400 before the request reaches the model, and json_object still works there.
    • Tool.function.name: adds "pattern": "^[a-zA-Z0-9_-]{1,64}$" and says a name outside that pattern is rejected with a 400, on every model.
  • src/lib/openapiSpec.test.ts: new documented 400s block pinning the pattern, the ResponseFormat sentence and both locale cards; the existing structured-output example check now reads the "works on" clause (the description now also names a model that rejects json_schema, so a plain mention was no longer enough).

Why

api.nan.builders is starting to reject both shapes with a 400 before routing. The spec already described the tool-name charset and where json_schema works, but the deepseek-v4-flash card did not say structured output via json_schema is unsupported. Members should find this in the docs, not from the error.

Evidence

  • npm test: 66 files, 1309 tests passed.
  • Mutation check: with the doc/spec changes stashed, 4 of the new/tightened tests fail; restored, all pass.
  • npm run build: completes (only the existing chunk-size / punycode warnings); rendered model chunks contain the new copy in both locales.
  • openapi.json parses; the existing $ref resolution and catalogue tests still pass.

Deploy notes

No VERSION file. .github/workflows/deploy.yml runs npm ci, npm test, npm run build and wrangler deploy to Cloudflare Workers on push to main, so merging deploys. No env vars or migrations.

🤖 Generated with Claude Code

barckcode and others added 2 commits September 29, 2026 16:03
…name 400

The API now rejects, with a 400 before routing, tool names outside
^[a-zA-Z0-9_-]{1,64}$ (any model) and response_format json_schema on
deepseek-v4-flash (json_object keeps working there).

- models.mdx (EN/ES): the deepseek-v4-flash card states json_object is
  supported, json_schema is rejected with a 400, and points to qwen3.6 or
  gemma4 for schema-constrained output.
- openapi.json: ResponseFormat says json_schema is rejected on
  deepseek-v4-flash while json_object works; Tool.function.name gains the
  machine-readable pattern and says names outside it are rejected with a 400.
- openapiSpec.test.ts: pin the new constraints in the spec and on both
  model cards; tighten the structured-output example check so it reads the
  "works on" clause instead of any mention of the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the prompt

Probed 2026-09-29: without it the upstream answers 400, and the API will
reject it with a 400 before routing. Also ES wording 'es compatible'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sre-helmcode
sre-helmcode merged commit 3116e67 into main Sep 29, 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.

2 participants