You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOCS] Messages API stop_reason is nullable and gains model_context_window_exceeded #1262
inference-gateway/schemas#329 changes the Anthropic-compatible MessagesResponse.stop_reason field: it is now nullable (null in the streaming message_start event, non-null otherwise) and the enum gains model_context_window_exceeded. Any docs page describing the Messages API response or streaming events should reflect this.
Acceptance Criteria
Messages API response docs show stop_reason as nullable and explain it is null in message_start
model_context_window_exceeded listed among the stop reasons
What changed: I added a new Messages API section to api-reference.md, between the Responses API and Decisions API sections. It covers:
POST /v1/messages with a request example and a MessagesResponse example.
A Stop reasons section. stop_reason is always present but can be null:
It is set in non-streaming responses.
It is null in the first streaming event, message_start.
The final value arrives in the message_delta event.
A table of every stop reason, including the new model_context_window_exceeded.
A Streaming subsection that lists the stream event types, with a message_start / message_delta example.
One criterion is partly met: the link to inference-gateway/schemas#329 is in the PR body, not on the docs page. AGENTS.md doesn't allow issue or PR references in doc content.
The examples' IDs, token counts and model version string are made up for illustration. All field names and enum values come from the current openapi.yaml.
| Branch | PR #1268
Activity
edenreich commentedon Nov 17, 2026
@claude can you document this?
inference-gateway-maintainer commentedon Nov 17, 2026
Claude finished @edenreich's task in 1m 47s —— View job •
docs/issue-1262-20261117-2021• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-1262-20261117-2021?quick_pull=1&title=Issue%20%231262%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%231262%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Documented nullable
stop_reasonobservability.mdstop_reasonandmodel_context_window_exceededlint:md,format:checkandbuild: all three passWhat changed: I added a new Messages API section to
api-reference.md, between the Responses API and Decisions API sections. It covers:POST /v1/messageswith a request example and aMessagesResponseexample.stop_reasonis always present but can be null:nullin the first streaming event,message_start.message_deltaevent.model_context_window_exceeded.message_start/message_deltaexample.One criterion is partly met: the link to inference-gateway/schemas#329 is in the PR body, not on the docs page.
AGENTS.mddoesn't allow issue or PR references in doc content.The examples' IDs, token counts and model version string are made up for illustration. All field names and enum values come from the current
openapi.yaml.| Branch | PR #1268
inference-gateway-releaser commentedon Nov 17, 2026
🎉 This issue has been resolved in version 0.9.27 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀