Repository navigation
serve: split Anthropic thinking response blocks - #568
Merged
JustVugg merged 1 commit intoJul 23, 2026
Merged
Conversation
This was referenced Jul 23, 2026
NeuralNotwerk
pushed a commit
to NeuralNotwerk/colibri
that referenced
this pull request
Jul 25, 2026
…gg#597) Two self-contained gaps from mkelcb's serving report (JustVugg#597), both in the Python gateway, both behind explicit opt-ins: - JustVugg#597 item 2 — the DNS-rebinding Host guard accepted only loopback names and the bind address, so a legitimate reverse proxy / Tailscale MagicDNS host in front of the loopback bind was rejected with 403 and had no supported way to be trusted. Add `--allowed-host` (repeatable) and `COLI_ALLOWED_HOSTS` (comma-separated) that extend the allowlist. Default is unchanged (loopback + bind address only); no wildcard, each trusted Host is explicit, and this is orthogonal to CORS and API-key auth. - JustVugg#597 item 5 — the cold-prefill keepalive streamed a visible `reasoning_content: "."` every 10s, painting hundreds of dots in the client's reasoning panel over a minutes-long prefill. Default to an empty delta (still a valid SSE data event, still resets the client idle timer); COLI_VISIBLE_KEEPALIVE=1 restores the old visible dot for diagnosing keepalive delivery. Items 1 and 4 (non-streaming) of the same report are already fixed on dev by JustVugg#535 and JustVugg#568; items 3, 4-streaming and 6 are tracked separately. Tests: 4 new AllowedHostsTest cases (normalisation, trusted host accepted with port/case, untrusted rejected by default and with an allowlist). Full server suite 68/68. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
ErikTromp
pushed a commit
to SensAI-PT/aviary
that referenced
this pull request
Aug 9, 2026
…-blocks-c2 serve: split Anthropic thinking response blocks
ErikTromp
pushed a commit
to SensAI-PT/aviary
that referenced
this pull request
Aug 9, 2026
…gg#597) Two self-contained gaps from mkelcb's serving report (JustVugg#597), both in the Python gateway, both behind explicit opt-ins: - JustVugg#597 item 2 — the DNS-rebinding Host guard accepted only loopback names and the bind address, so a legitimate reverse proxy / Tailscale MagicDNS host in front of the loopback bind was rejected with 403 and had no supported way to be trusted. Add `--allowed-host` (repeatable) and `COLI_ALLOWED_HOSTS` (comma-separated) that extend the allowlist. Default is unchanged (loopback + bind address only); no wildcard, each trusted Host is explicit, and this is orthogonal to CORS and API-key auth. - JustVugg#597 item 5 — the cold-prefill keepalive streamed a visible `reasoning_content: "."` every 10s, painting hundreds of dots in the client's reasoning panel over a minutes-long prefill. Default to an empty delta (still a valid SSE data event, still resets the client idle timer); COLI_VISIBLE_KEEPALIVE=1 restores the old visible dot for diagnosing keepalive delivery. Items 1 and 4 (non-streaming) of the same report are already fixed on dev by JustVugg#535 and JustVugg#568; items 3, 4-streaming and 6 are tracked separately. Tests: 4 new AllowedHostsTest cases (normalisation, trusted host accepted with port/case, untrusted rejected by default and with an allowlist). Full server suite 68/68. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary
When Anthropic thinking was enabled,
/v1/messagesopened a GLM reasoning block but returned the rawreasoning</think>answeroutput as one text block. Streaming also forwarded the marker and reasoning as text, including when</think>crossed engine chunks.Split reasoning from answer content at the adapter boundary, emit Anthropic thinking/text blocks and typed stream deltas, preserve prior assistant thinking for multi-turn requests, and keep the default thinking-disabled path unchanged. The
colibri-localsignature is stable opaque local compatibility metadata; it is not an Anthropic cryptographic signature.Validation
No CUDA paths or performance claims are involved.
make -C c checkmake -C c cuda-test(if applicable)Compatibility