docs(models): document json_schema 400 on deepseek-v4-flash and tool-name 400 - #117
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
src/content/docs/models.mdx, ESsrc/content/docs-es/models.mdx): the description and capability list now state thatresponse_formatjson_objectis supported,json_schemais not and is rejected with a 400, and that schema-constrained output should useqwen3.6orgemma4.src/data/openapi.json:ResponseFormat.description:json_schemaworks onqwen3.6andgemma4; ondeepseek-v4-flashit is rejected with a400before the request reaches the model, andjson_objectstill works there.Tool.function.name: adds"pattern": "^[a-zA-Z0-9_-]{1,64}$"and says a name outside that pattern is rejected with a400, on every model.src/lib/openapiSpec.test.ts: newdocumented 400sblock 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 rejectsjson_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_schemaworks, but the deepseek-v4-flash card did not say structured output viajson_schemais unsupported. Members should find this in the docs, not from the error.Evidence
npm test: 66 files, 1309 tests passed.npm run build: completes (only the existing chunk-size / punycode warnings); rendered model chunks contain the new copy in both locales.openapi.jsonparses; the existing$refresolution and catalogue tests still pass.Deploy notes
No
VERSIONfile..github/workflows/deploy.ymlrunsnpm ci,npm test,npm run buildandwrangler deployto Cloudflare Workers on push tomain, so merging deploys. No env vars or migrations.🤖 Generated with Claude Code