Provider capability factsheet (z.ai / Anthropic / OpenAI) #127

Closed
opened 2026-10-23 10:12:42 +02:00 by AlexKucera · 2 comments
Owner

Part of #125

Question

Ground the native client in verified provider facts. Per provider — z.ai (BOTH endpoint families: coding plan and standard PAAS), Anthropic, OpenAI: (1) /models listing endpoint — auth, response shape, filtering, whether it lists reasoning/thinking variants; (2) function-calling wire format for submit_fix_cards / submit_research_notes-style tools, including how streaming tool-call deltas arrive; (3) SSE quirks — GLM's reasoning_content side-channel and the coding endpoint's end-of-turn content flush (no live streaming), Anthropic native event stream (message_start / content_block_delta / message_delta) vs its OpenAI-compat layer; (4) reasoning-model parameter surface (GLM thinking.type / reasoning_effort rules incl. cannot-disable on 5.3 and the coding-plan effort mapping; OpenAI and Anthropic equivalents) and budget rules (thinking counts inside max_tokens); (5) error shapes worth surfacing in a settings Test Connection probe. Deliverable: docs/research/native-llm-providers.md factsheet on branch research/native-llm-providers — LOCAL commits only, push awaits authorization. Seed material: prototypes/model-bench/bench.py (working multi-provider client incl. the param-fix retry ladder), prototypes/model-bench/results/, the llm-api-benchmarking skill. Verify against official docs AND live probes (.secrets holds throwaway keys — read from disk, never print). Resolution comment carries the factsheet path + branch @ commit.

[Generated by AI]

Part of #125 ## Question Ground the native client in verified provider facts. Per provider — z.ai (BOTH endpoint families: coding plan and standard PAAS), Anthropic, OpenAI: (1) `/models` listing endpoint — auth, response shape, filtering, whether it lists reasoning/thinking variants; (2) function-calling wire format for submit_fix_cards / submit_research_notes-style tools, including how streaming tool-call deltas arrive; (3) SSE quirks — GLM's reasoning_content side-channel and the coding endpoint's end-of-turn content flush (no live streaming), Anthropic native event stream (message_start / content_block_delta / message_delta) vs its OpenAI-compat layer; (4) reasoning-model parameter surface (GLM thinking.type / reasoning_effort rules incl. cannot-disable on 5.3 and the coding-plan effort mapping; OpenAI and Anthropic equivalents) and budget rules (thinking counts inside max_tokens); (5) error shapes worth surfacing in a settings Test Connection probe. Deliverable: `docs/research/native-llm-providers.md` factsheet on branch `research/native-llm-providers` — LOCAL commits only, push awaits authorization. Seed material: `prototypes/model-bench/bench.py` (working multi-provider client incl. the param-fix retry ladder), `prototypes/model-bench/results/`, the `llm-api-benchmarking` skill. Verify against official docs AND live probes (.secrets holds throwaway keys — read from disk, never print). Resolution comment carries the factsheet path + branch @ commit. [Generated by AI]
AlexKucera added the wayfinder:researchwayfinder:research labels 2026-10-23 10:12:42 +02:00
AlexKucera added a new dependency 2026-10-23 10:12:57 +02:00
AlexKucera self-assigned this 2026-10-23 10:14:49 +02:00
Author
Owner

Resolved — factsheet delivered.

Factsheet: docs/research/native-llm-providers.md — per provider (z.ai coding + standard families, Anthropic, OpenAI): endpoints & auth, /models shapes, chat/streaming wire incl. thinking channels, submit_fix_cards-style typed-tool formats, parameter quirks + budget rules, error decoding for a Test Connection probe. Grounded in official docs and live probes run today against the real endpoints.

Branch: research/native-llm-providers @ d12463b1fb6aa00ad79d22d24cc61de33d2dfc10 — local only, push awaits authorization.

Key findings (details + probe transcripts in the factsheet):

  • z.ai budget trap reproduced live: reasoning counts inside max_tokens — max_tokens:1024 + effort max → HTTP 200, finish=length, empty content, 1007/1024 tokens reasoning. Never gate on status code; cap ≥24k for thinking passes. Content on both z.ai families arrives in an end-of-turn flush (only reasoning_content streams live); TTFT ≈ thinking + most of generation.
  • Two seed traps did not reproduce and are corrected in the factsheet: the coding key worked on the standard PAAS base URL (chat + /models, 200 both — so /models proves nothing about key/endpoint pairing; no 1113 anywhere in bench results), and thinking.type:"disabled" is accepted (200) on both families today despite docs saying it fails. Stable wire = thinking:enabled + explicit reasoning_effort (wire enum is wider than docs: none…max, error 1210; docs map to low/high/max, default max).
  • Decision-critical for #128: OpenAI rejects function tools with any reasoning_effort ≠ none on /v1/chat/completions (400, names /v1/responses as the alternative) — typed-tool passes on OpenAI either run non-reasoning or need the Responses API. Anthropic 5.x removed forced tool choice (tool_choice tool/any → 400, auto only) and swapped thinking:{type:enabled,budget_tokens} for thinking:{type:adaptive} + output_config.effort ∈ low/medium/high/xhigh/max (400s verbatim in factsheet); thinking streams as thinking_delta+signature_delta, tool args as incremental input_json_delta fragments (20 live) vs z.ai's single-delta flush. OpenAI max_tokens → 400 use max_completion_tokens.
  • z.ai coding plan is first-party restricted to listed coding tools — don't ship a coding-plan key in Museion; standard PAAS keys are the distribution-clean path.

DOX: docs/research/ created and indexed in docs/AGENTS.md. Push awaits authorization.

[Generated by AI]

Resolved — factsheet delivered. **Factsheet**: `docs/research/native-llm-providers.md` — per provider (z.ai coding + standard families, Anthropic, OpenAI): endpoints & auth, `/models` shapes, chat/streaming wire incl. thinking channels, `submit_fix_cards`-style typed-tool formats, parameter quirks + budget rules, error decoding for a Test Connection probe. Grounded in official docs **and** live probes run today against the real endpoints. **Branch**: `research/native-llm-providers` @ `d12463b1fb6aa00ad79d22d24cc61de33d2dfc10` — **local only, push awaits authorization**. **Key findings** (details + probe transcripts in the factsheet): - z.ai budget trap reproduced live: reasoning counts inside `max_tokens` — `max_tokens:1024` + effort `max` → HTTP 200, `finish=length`, **empty content**, 1007/1024 tokens reasoning. Never gate on status code; cap ≥24k for thinking passes. Content on both z.ai families arrives in an end-of-turn flush (only `reasoning_content` streams live); TTFT ≈ thinking + most of generation. - Two seed traps did **not** reproduce and are corrected in the factsheet: the coding key worked on the standard PAAS base URL (chat + `/models`, 200 both — so `/models` proves nothing about key/endpoint pairing; no 1113 anywhere in bench results), and `thinking.type:"disabled"` is accepted (200) on both families today despite docs saying it fails. Stable wire = `thinking:enabled` + explicit `reasoning_effort` (wire enum is wider than docs: `none…max`, error 1210; docs map to low/high/max, default max). - Decision-critical for #128: **OpenAI rejects function tools with any `reasoning_effort` ≠ `none` on `/v1/chat/completions`** (400, names `/v1/responses` as the alternative) — typed-tool passes on OpenAI either run non-reasoning or need the Responses API. **Anthropic 5.x removed forced tool choice** (`tool_choice` tool/any → 400, auto only) and swapped `thinking:{type:enabled,budget_tokens}` for `thinking:{type:adaptive}` + `output_config.effort ∈ low/medium/high/xhigh/max` (400s verbatim in factsheet); thinking streams as `thinking_delta`+`signature_delta`, tool args as incremental `input_json_delta` fragments (20 live) vs z.ai's single-delta flush. OpenAI `max_tokens` → 400 use `max_completion_tokens`. - z.ai coding plan is first-party restricted to listed coding tools — don't ship a coding-plan key in Museion; standard PAAS keys are the distribution-clean path. DOX: `docs/research/` created and indexed in `docs/AGENTS.md`. Push awaits authorization. [Generated by AI]
Author
Owner

Landed: merged to main @ 32f601d (merge: fold native-llm-providers research into main) — authorization given 2026-10-23. The pre-merge correction commit (49a121c, z.ai streaming claim) is part of the merged history.

[Generated by AI]

Landed: merged to main @ 32f601d (merge: fold native-llm-providers research into main) — authorization given 2026-10-23. The pre-merge correction commit (49a121c, z.ai streaming claim) is part of the merged history. [Generated by AI]
Sign in to join this conversation.