GitNexus/gitnexus/test
samuel mbabhazi 42bb67cb6a
feat(wiki): add a native anthropic provider for the Messages API (#3816)
* feat(wiki): add a native anthropic provider for the Messages API

gitnexus wiki could only reach Claude through the Claude Code CLI or an
OpenAI-compatible gateway. The anthropic provider calls the Messages API
directly: x-api-key auth with ANTHROPIC_API_KEY (then GITNEXUS_API_KEY,
never OPENAI_API_KEY), a top-level system prompt, max_tokens, and no
sampling parameters. Only text blocks become the page; max_tokens and
refusal stops fail the call, like finish_reason "length" does today.

readSSEStream now takes a StreamProtocol describing what each data:
payload contributes, so chat completions and Messages share one reader
(the consolidation asked for on #1404). The chat-completions request is
built by the same code as before.

Closes #3413

* fix(wiki): accept only https image URLs for the anthropic provider

---------

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
2026-11-04 13:12:26 +00:00
..
fixtures feat(go): index Gin and Echo routes through configured aliases (#3750) 2026-11-01 21:20:00 +00:00
helpers fix(java): resolve overloads by JLS phases (#3791) 2026-11-01 11:08:00 +00:00
integration perf: reduce lookup allocations and stream identity checks (#3805) 2026-11-04 10:15:24 +00:00
unit feat(wiki): add a native anthropic provider for the Messages API (#3816) 2026-11-04 13:12:26 +00:00
utils feat(storage): add configurable index storage and content retention tiers (#3060) 2026-09-12 20:31:55 +00:00