docs(custom-model): say a PUT clears defaultContextLength and a learned figure wins

Round-four review smaller items: api-reference now states the opposite-of-apiKey behaviour for an omitted defaultContextLength, and the wiki sentence follows the code, modelContextLengths[id] ?? defaultContextLength: any stored figure beats the default.
This commit is contained in:
Devvyn committed 2026-11-02 17:04:12 +08:00
1 parent 5c8a557390
commit b177885dd7
2 files changed
+8 -5

No files matched your search

+3 -1
View File
@@ -1220,7 +1220,9 @@ authStyle?, defaultModelId?, defaultContextLength? }` creates one. `id`
keeps the stored one rather than clearing it — the client never receives
the real value to resend deliberately unchanged, so omission is the only
way to say "leave it alone"; there is no way to clear a key back to unset
this way. `defaultModelId`, when set, must be one of that endpoint's own
this way. `defaultContextLength` behaves the opposite way: a PUT without
it clears the stored value, so send the field back to keep it.
`defaultModelId`, when set, must be one of that endpoint's own
`models` (`400 INVALID_INPUT` otherwise).
- `DELETE /api/v1/model-endpoints/:id` removes one.
- `POST /api/v1/model-endpoints/:id/discover-models` fetches the endpoint's