Conversation
Clients that only talk to Anthropic endpoints -- Claude Code above all, which is what the reporter wants to use -- could not reach colibri at all. This adds /v1/messages alongside the OpenAI endpoint on the same port. It is a translation layer, not a second engine path: the Anthropic request is rewritten into the exact OpenAI-shaped body the existing path already validates, so prompt rendering, scheduling, generation and tool parsing stay single-sourced and cannot drift between the two protocols. Only the request translation and the response/SSE shapes are new. Covered: system prompt (string or text blocks), text/tool_use/tool_result blocks, tools with input_schema, all four tool_choice modes, streaming with the full named-event sequence, stop_reason mapping, Anthropic usage field names, extended thinking, and x-api-key auth (Bearer still works, both compared in constant time). Anthropic's error envelope on this path only. Two details a client actually notices: tool results are emitted BEFORE the user's own text in the same message, or the model reads an answer to a question it has not been asked yet; and the keepalive during the minutes-long cold prefill uses the protocol's own event instead of the OpenAI path's reasoning-delta workaround. stop_sequences, top_k and non-text blocks are refused explicitly rather than silently ignored. 14 tests asserting the client-visible contract; full Python suite green (149). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
serve: Anthropic Messages API on /v1/messages — Claude Code talks to colibri (#343)
python3 openai_server.py --model <dir> looked for a binary named 'glm' next to itself. Since #391 the build produces 'colibri', so direct invocation was broken on any clean checkout -- it only appeared to work in trees that still had a stale glm from an older build. Spotted by @RDouglasSharp while working on #488. Resolve the engine by probing colibri / colibri.exe first and falling back to glm / glm.exe, the same order the coli launcher uses, so old trees keep starting. Verified by removing the stale glm and running the gateway: it resolves to colibri and the engine launches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
serve: engine default still said `glm` after the rename — direct invocation broken on a clean checkout
Promised in the #527 response (Defender ML false positive on the v1.1.0 Windows zip): the checksums are the public, permanent form of the release-vs-CI-artifact comparison performed there, so anyone can verify a download is exactly what CI built from the tagged source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
release: publish SHA256SUMS.txt with every release (#527 follow-up)
GrDraft is ~107 KB (Grammar's 1024 static rules plus the PDA walker), and
the designated initializer `={.max=24}` moved the entire struct out of .bss
and into .data — so every shipped binary carried 106,848 bytes of mostly
zeros. On Linux the engine drops from 474,904 to 368,016 bytes (-22.5%);
the Windows exe carried the same blob.
Found while triaging #527 (Defender flags the v1.1.0 Windows exe, v1.0.0 is
clean on the same definitions). Section forensics on the two published exes:
identical toolchain (GCC 16.1.0 Rev5 MSYS2), identical 9-section layout, but
.data went 1,840 -> 108,752 bytes at 0.083 bits/byte entropy. A large,
near-zero-entropy blob in a writable section is exactly what an AV ML
heuristic reads as an unpacking buffer for a packed payload. Whether that is
what tripped the classifier is not knowable from outside — the model is a
black box — but shipping 107 KB of zeros is a defect on its own terms, and
removing it makes the hypothesis testable.
Static storage is zero-initialized by the C standard, so the struct lives in
.bss again; `max` is set at the top of grammar_setup(), which both call
sites run before any read of it (the only read is inside `if(g_grd.on)`).
check.yml now uploads the Windows exe as an artifact, so an antivirus report
can be verified on a PR instead of only after a release is published.
Verified: full C suite green; grammar-loading run byte-identical before and
after on glm_tiny.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
engine: 107 KB of zeros were being shipped in .data — binary -22% (#527 lead)
v1.1.0 trips Microsoft Defender on Windows, and the cause was ours: 107 KB of zeros in .data (#527/#532). This gets the fix out rather than leaving every new Windows download to hit the same alert. Also carries the Anthropic /v1/messages endpoint (#343), the gateway engine default fix (#526), release checksums (#530), and the Get-started docs rewrite (#521). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
release: bump to 1.1.1 and write the CHANGELOG
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.
Same-day patch. v1.1.0's Windows binary trips Microsoft Defender, and the cause was ours — every new Windows download hits that alert right now, so this should go out quickly.
#532 — the actual bug.
static GrDraft g_grd={.max=24};looks harmless, butGrDraftis ~107 KB (the grammar's 1024 static rules plus the PDA walker) and any initializer moves the whole struct out of.bssinto.data: 106,848 bytes of near-zero-entropy data written into every binary, in a writable section — the classic shape of an unpacking buffer for a packed payload, and a heavily-weighted feature for PE ML classifiers. Section forensics against v1.0.0 (clean on the same Defender definitions) isolated it: identical toolchain, identical PE layout,.data1,840 → 108,752 bytes. A Windows build with the fix scans clean where v1.1.0 does not. Binaries also shrink: Linux engine 474,904 → 368,016 bytes, -22.5%.Also shipping:
glmafter the rename — direct invocation broken on a clean checkout #526 —python3 openai_server.pywas broken on a clean checkout (still looked forglmafter the refactor: split glm.c → colibri.c + 4 header modules (−18%) #391 rename). Spotted by @RDouglasSharp./v1/messages, closes [Feature]: Support Anthropic protocol endpoint #343: Claude Code and the Anthropic SDKs now work against colibri with no shim.SHA256SUMS.txtpublished with every release.After merge: tag
v1.1.1.🤖 Generated with Claude Code