Skip to content

Changelog

All notable changes to this project will be documented in this file. From v0.1.0 onward this file is generated by towncrier via towncrier build; do not edit it by hand — add a newsfragment under changelog.d/ instead.

0.12.2 (2026-11-27)

Documentation

  • Add docs/deepseek/ module documentation and mkdocs nav entries for the direct DeepSeek provider (20261127T133140Z-add-docs-deepseek-module-documentation-a-d9a4) (#776) (69ea39b)

0.12.1 (2026-11-13)

Documentation

  • docstring gap: add docstring to AnthropicModel.request_stream in src/robotsix_llmio/anthropic/model.py:39 (20261113T014937Z-docstring-gap-add-docstring-to-anthropic-149e) (#761) (c3c7960)
  • Document ARCHITECTURE.md update expectation and env-var coverage in CONTRIBUTING.md and README (20261113T044900Z-document-architecture-md-update-expectat-e2e9) (#764) (b73ac03)
  • Reorganize module clients: align to per-module layout (src/docs/tests) (20261113T050656Z-reorganize-module-clients-align-to-per-m-5e0e) (#766) (57d589c)
  • Reorganize module config: align to per-module layout (src/docs/tests) (20261113T050656Z-reorganize-module-config-align-to-per-mo-2ad2) (#767) (d9bbda6)
  • Reorganize module core: align to per-module layout (src/docs/tests) (20261113T050656Z-reorganize-module-core-align-to-per-modu-de3d) (#765) (d5752a0)

0.12.0 (2026-11-04)

Features

  • Export FailoverCostGuardError from the root robotsix_llmio package like its exception peers (20261104T172617Z-export-failovercostguarderror-from-the-r-a683) (#752) (b681843)
  • Sweep robotsix_llmio root package for exception peers missing from the top-level exports (20261104T175316Z-sweep-robotsix-llmio-root-package-for-ex-734f) (#755) (9ce7f88)

0.11.1 (2026-11-02)

Documentation

  • AGENT.md: CI / workflows — When a PR replaces, renames, or removes a CI job, update the repo's required st… (20261102T125450Z-agent-md-ci-workflows-when-a-pr-replaces-7763) (#748) (b184b96)

0.11.0 (2026-10-30)

Features

  • Emit DeprecationWarning for legacy default/fallback tier-config keys and document a shim removal policy (20261030T040153Z-emit-deprecationwarning-for-legacy-defau-8914) (#736) (95d5125)

Documentation

  • Reorganize module claude-sdk: align to per-module layout (src/docs/tests) (20261030T041900Z-reorganize-module-claude-sdk-align-to-pe-ccec) (#740) (ce57018)
  • Reorganize module core: align to per-module layout (src/docs/tests) (20261030T041900Z-reorganize-module-core-align-to-per-modu-879d) (#739) (ee3f29e)
  • Reorganize module openrouter: align to per-module layout (src/docs/tests) (20261030T041900Z-reorganize-module-openrouter-align-to-pe-9a8c) (#738) (3040ada)

0.10.1 (2026-10-26)

Bug Fixes

  • claude_sdk: retry the SDK's bare "Control request timeout" as transient (#729) (3fb688b)

0.10.0 (2026-10-26)

Features

  • Add a direct Anthropic Messages API transport (anthropic/ subpackage, "anthropic" provider prefix) (20261025T134107Z-add-a-direct-anthropic-messages-api-tran-f572) (#720) (572c4fc)
  • Generalise TierConfig to an ordered N-slot provider chain with 2-slot back-compat migration (20261025T134210Z-generalise-tierconfig-to-an-ordered-n-sl-1168) (#719) (d98c2d1)
  • Rework core/failover.py to cascade through the full provider slot chain (20261025T134210Z-rework-core-failover-py-to-cascade-throu-8657) (#722) (e81db23)
  • Set baked default slot order to anthropic → claudeSDK → openrouter for all capability levels (20261025T134210Z-set-baked-default-slot-order-to-anthropi-5a97) (#723) (baf15eb)
  • Update config loader and add persisted-config migration for old slot keys (20261025T134210Z-update-config-loader-and-add-persisted-c-21e8) (#724) (e6fd9dc)

Documentation

  • AGENT.md: Configuration conventions — When changing baked defaults in src/robotsix_llmio/config/tier.py, keep the l… (20261025T175444Z-agent-md-configuration-conventions-when-5d0e) (#725) (4d570be)
  • Update docs and CHANGELOG for the 3-slot provider failover chain (20261025T134210Z-update-docs-and-changelog-for-the-3-slot-634b) (#727) (14fbf96)

0.9.2 (2026-10-23)

Bug Fixes

  • CI failure: CI on main (20261023T092155Z-ci-failure-ci-on-main-966a) (#714) (6986cde)
  • claude_sdk: stop refusing Bash tokens that cannot name a real path (#716) (19f120a)

0.9.1 (2026-10-22)

Bug Fixes

  • claude_sdk: stop the CLI loading the login's claude.ai connectors (#710) (3bc5e3f)
  • deps: bump claude-agent-sdk and certifi past fresh advisories (#711) (f51fbf8)

0.9.0 (2026-10-14)

Features

  • Add per-request failover cost guard to block more-expensive retries (20260909T194112Z-add-per-request-failover-cost-guard-to-b-6272) (#697) (e29e985)

Documentation

  • Validate failover cost reduction and completion rate via cost-monitor (20260909T194112Z-validate-failover-cost-reduction-and-com-4c9a) (#699) (3a7341c)

0.8.0 (2026-10-14)

Features

  • price-ceiling: --fix bars cache-read outliers in source and the weekly check opens a PR with the diff (#690) (8db705e)

Bug Fixes

  • tiers: bar cache-read outlier providers flagged by the price-ceiling drift check (#691) (d9bda2d)

0.7.10 (2026-10-13)

Bug Fixes

  • CI failure: Price ceiling drift check on main (20261012T063138Z-ci-failure-price-ceiling-drift-check-on-e292) (#685) (a8d6f00)
  • ci: bump bump.yml pin to ghwf 81726d29 (App token scoped to the repo NAME) (#688) (9f51396)

0.7.9 (2026-10-06)

Bug Fixes

  • claude_sdk: deny the operator's claude.ai connector tools and AskUserQuestion in headless agents (#682) (e17e8ef)

0.7.8 (2026-10-05)

Bug Fixes

  • CI failure: Price ceiling drift check on main (20261005T065020Z-ci-failure-price-ceiling-drift-check-on-0c1e) (#680) (31266fb)

0.7.7 (2026-10-02)

Documentation

  • Document the clients/ REST-client layer in ARCHITECTURE.md's "Layer model" section (20261002T131450Z-document-the-clients-rest-client-layer-i-0eef) (#678) (52a8ba4)

0.7.6 (2026-09-09)

Bug Fixes

  • claude_sdk: let the Bash confinement hook reach the CLI's own scratch area for the workspace session (#664) (3595b3b)
  • claude_sdk: stop the Bash confinement hook refusing the workspace's own .venv interpreter and regex fragments (#662) (7a8aa21)

0.7.5 (2026-09-08)

Bug Fixes

  • claude_sdk: deny the Skill tool for restricted agents (#660) (d948d4e)
  • tracing: keep the trace-name guard after the root span ends (#657) (8e396ff)

0.7.4 (2026-09-06)

Bug Fixes

  • allow safe pseudo-devices (/dev/null etc.) through the Bash confinement hook (#652) (65e517e)

0.7.3 (2026-09-05)

Bug Fixes

  • claude_sdk: spill oversized system prompts to --system-prompt-file (#651) (453bad9)
  • schedule GC-finalizer aclose() on the running loop instead of dropping it (#645) (787547d)

0.7.2 (2026-09-04)

Bug Fixes

  • claude_sdk: enumerate exact tool names in the naming note (#634) (70c6ae9)
  • claude_sdk: teach the naming note the ToolSearch load step for deferred tools (#636) (60987bb)
  • make the OpenRouter transport a base dependency, not an extra (#643) (a02fbcd)

0.7.1 (2026-09-01)

Bug Fixes

  • claude_sdk: tell tool agents their tools' real mcp__milltools__ names (#631) (f5e1791)
  • deps: refresh first-party pins + ghwf workflow pins to $/-tolerant main (#633) (7eee4cf)

0.7.0 (2026-09-01)

⚠ BREAKING CHANGES

  • TierLevel has three members; TierConfig has a new shape; LEVEL{1..5}DEFAULT, call/acall_with_tier_fallback, ModelHealthTracker and the LLMIO* env vars are gone.

Features

  • arm failover until the hinted quota reset; workhorse fallback moves to pro (#628) (3f51f20)
  • ask_image tool — image questions for text-only models via the vision binding (#629) (f06700a)
  • collapse 5 levels to 3 across two provider slots with automatic failover (#625) (3f9127a)
  • explicit slot resolution for consumers; dead credential arms failover (#626) (4b3f2ae)
  • level 3 back to deepseek-v4-pro, ceiling aligned to cheapest healthy band (#622) (0d2429a)

Bug Fixes

  • classify the CLI "Not logged in" wording as an auth error (#627) (ab978be)
  • pin level 3 to the dated deepseek-v4-pro-0813 snapshot (#624) (f45db0a)

Reverts

  • fallback level 2 back to flash — operator design decision (#630) (c560664)

0.6.0 (2026-08-31)

⚠ BREAKING CHANGES

  • tiers: every consumer's integer levels must shift by +1 for levels >= 2 (TierConfig.for_level accepts 1..5; TierLevel gains LEVEL5; LEVEL5_DEFAULT exported; LLMIO_LEVEL5_* env overrides). tier_fallback walks five tiers. check-price-ceilings now checks LEVEL3_DEFAULT for mimo.

Features

  • tiers: five capability levels — Claude haiku as level 2, former 2-4 shift to 3-5 (#610) (f9f3e5c)

Bug Fixes

  • CI failure: Price ceiling drift check on main (20260831T062341Z-ci-failure-price-ceiling-drift-check-on-1c9f) (#616) (8f919a5)
  • ci: use the $/ self-repository syntax for the local composite action (#617) (ff0f7d6)
  • claude_sdk: re-prompt the same session for JSON when a tool agent signs off in prose (#611) (4954852)
  • claude_sdk: recognise "You've hit your limit" as usage exhaustion (#612) (d051ac1)
  • claude_sdk: ship tool-returned images as MCP image blocks, not byte reprs (#606) (90c7c4f)
  • claude_sdk: treat a spent session window as usage exhaustion (#605) (f369b36)
  • config: raise the level-2 output cap to 65536 (xhigh reasoning eats it) (#603) (40ba3fc)
  • core: import robotsix-http's public compute_backoff, and bump the pin (#607) (13a53e4)
  • deps: bump mcp to 1.28.1 — WebSocket Host/Origin validation advisory (#618) (a18e324)
  • Fix _tier_fallback_loop to skip same-provider levels on exhaustion (20260829T220859Z-fix-tier-fallback-loop-to-skip-same-prov-9026) (#613) (e7ae5cd)
  • openrouter: apply explicit provider routing to non-DeepSeek models too (#608) (e660cb8)
  • tier: level-3 max_tokens 65536 → 131072 — reasoning burn hit the cap (#621) (ce5931d)
  • tighten cheap-tier max_price to $0.10/$0.20 and pin flash snapshot 20260731 (#601) (211f229)

0.5.0 (2026-08-24)

Features

  • Switch llmio level1 default model to deepseek/deepseek-v4-flash-latest (20260824T192519Z-switch-llmio-level1-default-model-to-dee-56bd) (#599) (d52f6ae)

0.4.2 (2026-08-21)

Bug Fixes

  • openrouter: unstick deepseek routing — refresh price ceiling, raise output caps (#586) (002bccd)

0.4.1 (2026-08-14)

Bug Fixes

  • _parse_output raises TypeError on PromptedOutput([]) — empty validators guard missing (20260811T141407Z-parse-output-raises-typeerror-on-prompte-0b4d) (#576) (7ee9418)
  • a refused session option is not a transient spawn failure (#580) (4d9ea9c)
  • an E2BIG spawn refusal is not transient (#578) (eee2e14)
  • surface the Claude CLI's stderr on a transport failure (#579) (8622770)

0.4.0 (2026-08-10)

⚠ BREAKING CHANGES

  • callers relying on a failure at the starting tier propagating immediately must now pass fallback_enabled=False.

Features

  • Cooldown before retrying a systematically-failing model in the fallback chain (20260809T142723Z-cooldown-before-retrying-a-systematicall-e410) (#561) (a4bbddc)
  • tier fallback on by default (#570) (158b3db)

Bug Fixes

  • CI failure: Docs on main (20260809T214217Z-ci-failure-docs-on-main-78fc) (#564) (4c1c35c)
  • CI failure: Docs on main (20260809T235823Z-ci-failure-docs-on-main-537f) (#572) (dfa0bbe)
  • Fix case mismatch in mkdocs.yml nav: contributing.md → CONTRIBUTING.md (20260809T170705Z-fix-case-mismatch-in-mkdocs-yml-nav-cont-2721) (#563) (667127f)
  • Fix mkdocs.yml nav: contributing.md → CONTRIBUTING.md (regression from PR #564) (20260809T220937Z-fix-mkdocs-yml-nav-contributing-md-contr-ec93) (#571) (b77c22f)

0.3.2 (2026-08-09)

Bug Fixes

  • release: don't fail lock-sync when the release branch is gone (#552) (a235a31)

0.3.1 (2026-08-08)

Bug Fixes

  • release: regenerate uv.lock on the release branch (#550) (6fd2de4)

0.3.0 (2026-08-08)

Features

  • add build_agent_for_level — pick a capability level, get an agent on that level's default provider+model (#210) (28b23a8)
  • claude_sdk: surface tool/thinking activity as live events (#405) (54b495c)
  • claude-sdk: allow web tools while otherwise restricted (#544) (a065fe7)
  • claude-sdk: restrict built-in tools via builtin_tools, fix tool-path model (#207) (596f52f)
  • claude-sdk: surface model reasoning in Langfuse traces (#208) (03c5d0d)
  • config: make TierConfig.level1 optional with a baked default (#290) (1fdde38)
  • core: is_usage_exhausted predicate + thread should_fallback through run_agent (#496) (5c52572)
  • native image support on the claude_sdk path (#411) (aada2ed)
  • release: adopt release-please, retire towncrier (#547) (e4e8018)

Bug Fixes

  • audit: drop suppressions for CVEs this repo already fixed (#545) (d11916a)
  • claude_sdk prompt flattening stringifies binary content parts (#410) (93b9f4a)
  • claude-sdk: honour the task_budget floor; never retry API 400s (#526) (c65df6b)
  • claude-sdk: retry without task_budget when the model rejects it (#541) (cfe7cdc)
  • claude-sdk: treat an expired OAuth credential as terminal, not transient (#528) (27af25c)
  • config: stop deriving task_budget from max_tokens on Claude SDK tiers (#542) (621f9e5)
  • detect Claude usage-credit exhaustion instead of treating it as a reply (#388) (519c376)
  • detect usage-exhaustion when the SDK collapses it into a raised exception (#390) (fd88a2b)
  • openrouter: stop hard-pinning DeepSeek; bound fallback price (#499) (4874a16)
  • raise Claude Agent SDK query wall-clock cap from 20min to 1h (#408) (0112772)
  • release: mint an App token so release PRs get CI (#549) (3957795)
  • statically declare lazy core exports under TYPE_CHECKING to kill CodeQL py/undefined-export FP (#204) (6cc7f41)
  • tests: stop fake claude_agent_sdk stub leaking across tests (#148) (4891330)
  • tier: break provider↔config.tier import cycle via core.tier_enum leaf (a7c128e)
  • tracing: always give the trace root a non-empty Langfuse name (#192) (cbe22ee)
  • tracing: name the trace even when the root loses session context (#197) (2af509c)

0.2.0 (2026-08-08)

Features

  • Claude SDK agents can now be granted WebFetch / WebSearch while otherwise restricted, via the new web_tools=True argument. They were previously denied along with the filesystem and shell built-ins, so a restricted research agent had no way to look anything up — and a refused tool call is indistinguishable from an empty result, so it reported "sources fetched, all empty" instead of "I cannot search". Reading the web mutates nothing local, so it is separable from the sandbox the denylist exists to enforce. Default stays off. (#web-tools-opt-in)

Bug Fixes

  • Clear the security audit on main: bump cryptography 48.0.1 → 50.0.0 (GHSA-g6cj-pr64-35w5, GHSA-m2h6-j472-rp4c, GHSA-jwv3-5hgf-82ww and their PYSEC equivalents — six advisories) and pymdown-extensions 10.21.3 → 11.0.1 (GHSA-9xwg-3r6f-jcx2, a path traversal in the b64 extension). Both are transitive and were failing the audit on every PR, not just new ones. (#clear-security-audit-debt)
  • Dropped the audit suppressions for PYSEC-2026-3552/3553/3554. All three are fixed in cryptography 49.0.0/50.0.0 and this repo already resolves 50.0.0, so the advisories never applied — the entries silenced nothing and would have masked any future advisory that reused an id. The mcp/claude-agent-sdk suppression, which still has no upstream fix, is untouched. (#drop-obsolete-cve-suppressions)
  • Stop sending a task_budget derived from max_tokens on the Claude SDK tiers. ClaudeAgentOptions has no per-response cap, so the value could only become an advisory whole-loop allowance the model is shown as a countdown — and both baked defaults (8192 on level 3, 16384 on level 4) sat below the API's 20,000 floor and were clamped up, so they capped nothing and simply told the model it had a small allowance for the entire task. Observed 2026-08-06: agents abandoning work before starting it ("I'm out of token budget for this task before I could load the required tools"), and a hard 400 on models that reject the parameter outright. Below-floor values now send no budget at all rather than being clamped up. The OpenRouter tiers keep max_tokens — there it is a real enforced per-response cap. (#no-task-budget-on-claude-sdk-tiers)
  • Drop task_budget and retry once when the API reports the model does not support it, instead of failing the call. task_budget is a beta parameter only some models accept; the transport was sending it unconditionally whenever a tier configured max_tokens, so every call against any other model died with 400 This model does not support user-configurable task budgets. Observed on 2026-08-06 taking mill's refine stage down across five boards. The supported set cannot be hardcoded here — callers configure a tier alias (sonnet, opus) that the claude CLI resolves downstream — so the rejection itself is the discovery mechanism: the budget is dropped, the request re-sent, and the model remembered so later calls skip straight to the working shape. (#task-budget-unsupported-model)
  • OTelTraceFilter no longer raises when the active span does not implement get_span_context(). Anything reporting itself as recording reaches the filter — span shims, no-op spans, and test doubles implementing only the slice of the OTel Span protocol their own caller needs — and a raising log filter breaks logging for the entire process. A missing attribute now degrades to "no trace id", honouring the "never raises" contract the class docstring already stated. (#trace-filter-tolerates-partial-span)

Miscellaneous

0.1.5 (2026-08-03)

Features

  • Add is_usage_exhausted predicate and thread should_fallback through run_agent/arun_agent. Callers can now pass should_fallback=is_usage_exhausted to degrade to the fallback model only when the primary's usage is exhausted (pydantic-ai UsageLimitExceeded or ClaudeSDKUsageExhaustedError), while still failing loudly on genuine errors — instead of the previous fall-back-on-everything default. (#20260728T170424Z-is-usage-exhausted-fallback-predicate)

Bug Fixes

  • Bump the pinned robotsix-http to pick up its is_transient fix. After llmio's retry primitives moved to that package, a json.JSONDecodeError wrapped in a cause chain (a model emitting malformed JSON for a tool call) and openai's APITimeoutError stopped being recognised as transient, so those failures hard-errored a run instead of being retried. (#bump-robotsix-http-transient)
  • Claude SDK: respect the task_budget.total API floor, and stop retrying API 400s.

A tier's max_tokens was mapped straight onto ClaudeAgentOptions.task_budget, but the two are different controls — max_tokens is a hard per-response output cap, while task_budget is an advisory whole-loop budget with an API-enforced minimum of 20,000 tokens. Any agent configured below that floor had every call rejected with 400 \task_budget.total` must be at least 20,000 tokens for this model(mill'srefine, atmax_tokens: 8192).build_task_budget()` now clamps to the floor and warns once per agent.

The 400 was also misclassified as transient: the CLI reports it as assistant text inside an is_error=True result, which claude_agent_sdk collapses into its degenerate-success frame, so the bounded retry burned all three attempts re-sending an identically invalid request and then surfaced an opaque transport failure that callers could read as "ran, changed nothing". A 400 is deterministic, so it now raises the dedicated ClaudeSDKPermanentAPIError and is never retried. Scoped to 400 — 429 and 5xx stay transient. (#claude-sdk-task-budget-floor) - Classify an expired or rejected Claude OAuth credential as its own terminal failure instead of a transient one. The CLI streams Failed to authenticate. API Error: 401 ... as assistant text and then exits non-zero, which claude_agent_sdk collapses into its generic returned an error result: success message — so a dead credential looked retryable, burned all three attempts against the same expired token, and surfaced as an opaque ClaudeSDKAPIError transport failure. _stream_query now raises the new ClaudeSDKAuthError from both shapes (collapsed exception and clean is_error=True result), and is_claude_sdk_transient excludes it so it fails fast. Callers can catch it alongside ClaudeSDKUsageExhaustedError to degrade to a different capability tier and keep serving while the credential is dead. (#claude-sdk-auth-401) - DeepSeek-on-OpenRouter requests no longer hard-pin the upstream provider. The layer previously sent {"only": ["DeepSeek"], "allow_fallbacks": False}, so when the DeepSeek upstream account ran out of balance (HTTP 402 Provider returned error, provider_name: DeepSeek, is_byok: False) every deepseek/* request failed even though ~17 other providers served the same model and OpenRouter had already marked DeepSeek status: -5. Routing now uses order + allow_fallbacks: True, keeping DeepSeek first for prompt-cache warmth while letting OpenRouter route past it during an outage.

Fallback cost is bounded by a new max_price ceiling, configurable per tier via provider_kwargs (max_price_prompt / max_price_completion) and defaulting to $0.70/$1.40 per 1M tokens on the capable tier and $0.15/$0.30 on the cheap tier — measured so several healthy providers stay eligible while excluding the ~$1.740/$3.480 tail. allow_fallbacks=False remains available as an explicit opt-in.

Relatedly, an upstream provider's 402 is now treated as transient and retried, so a retry can re-route to a healthy provider. A 402 for our own exhausted OpenRouter credits (which carries no provider_name/is_byok: False markers) still fails fast, as does a BYOK provider's 402. (#openrouter-upstream-402-routing)

Miscellaneous

0.1.4 (2026-07-27)

Bug Fixes

Miscellaneous

0.1.3 (2026-07-20)

Bug Fixes

  • Sync wrappers (call_with_retry, call_with_retry_and_fallback, call_with_tier_fallback, run_agent) now drive the shared async loops without an event loop. The #382/#392 dedup refactor wrapped them in asyncio.run(...), which invoked the caller's sync fn inside a running loop — crashing every run_sync-style callable (pydantic-ai Agent.run_sync, claude_sdk tool agent) with RuntimeError: asyncio.run() cannot be called from a running event loop / This event loop is already running. (#20260719T000000Z-sync-wrappers-run-loop-free-fix-run-sync-crash)

Miscellaneous

0.1.2 (2026-07-13)

Features

  • Native image support on the claude_sdk path: prompts carrying pydantic-ai BinaryContent image parts are now sent to the CLI via streaming-input mode as base64 image content blocks (both the no-tools model and the tool-agent path), so vision-capable Claude models actually see attachments. Also fixes the tool-agent path stringifying multimodal list prompts through an f-string (the image-hang bug persisted there). Non-image binaries still degrade to the compact placeholder. (#claude-sdk-native-image-support)
  • claude_sdk._stream_query now surfaces live tool-call, tool-result, thinking, and intermediate-text activity as ClaudeSDKActivityEvent objects — previously only logged at INFO level and otherwise discarded. Callers opt in with the new activity_events(on_event) context manager (exported from robotsix_llmio.claude_sdk), which applies to both the no-tools ClaudeSDKModel path and the SDK-tools _SdkToolAgentHandle path without any change to build_agent()/run() call sites. (#20260707T084111Z-claude-sdk-activity-events)

Bug Fixes

  • Fix Claude Agent SDK prompt flattening stringifying binary content parts: a pydantic-ai BinaryContent (e.g. an attached image) was rendered via str(), ballooning a 2 MB image into a ~6 MB escaped-byte prompt that stalled the CLI subprocess for the full per-call wall-clock cap (and was then retried). Binary parts now flatten to a compact [binary attachment: <media type>, <n> bytes — not visible to this text-only model] placeholder. (#claude-sdk-binary-content-placeholder)
  • Raise SDK_QUERY_TIMEOUT (the Claude Agent SDK per-call wall-clock cap) from 20 minutes to 1 hour. A genuine multi-turn tool loop tripped the old cap under host load, surfacing as a ClaudeSDKQueryTimeout and failing the turn even though the call was still making progress. Still well under the SDK's own ~2h backstop. (#20260707T125132Z-raise-sdk-query-timeout-to-1h)

Miscellaneous

0.1.1 (2026-07-06)

Bug Fixes

  • Extend usage-credit-exhaustion detection to the case where claude_agent_sdk collapses the condition into a raised generic exception (e.g. the degenerate-success message) instead of a clean is_error=True return, discarding the real "You're out of usage credits" text before it would otherwise be checked. _stream_query now also checks the assistant text already streamed into chunks before such an exception fires, so this case raises ClaudeSDKUsageExhaustedError too instead of being misclassified as an ordinary transient error, retried 3x at the same exhausted tier, and finally leaked to the caller verbatim. (#claude-sdk-usage-exhausted-collapsed-exception)
  • Detect Claude subscription usage-credit exhaustion as a distinct failure. The SDK reports this as a normal-looking is_error=True result carrying the text "You're out of usage credits" rather than raising, so it was previously returned as if it were a genuine reply, or (when the SDK did raise) retried 3x at the same exhausted tier as a misclassified "degenerate success". _stream_query now raises the new ClaudeSDKUsageExhaustedError for this specific signature, and is_claude_sdk_transient excludes it (like the existing turn-limit case) so it fails immediately instead of burning retries at a tier that cannot recover until its credits reset. (#claude-sdk-usage-exhausted-detection)

Miscellaneous

0.0.0 (unreleased)

  • Add ruff to sandbox extra packages (.robotsix-mill/config.yaml) so the implement agent's pre-flight lint checks find it on PATH without repeated discovery attempts.
  • Added a Contributing page to the MkDocs docs site, including the root CONTRIBUTING.md via the mkdocs-include-markdown-plugin so new contributors can find the developer guide from the site.
  • Harden prompted-output JSON extraction and system prompt against models that hallucinate DSML/XML tool-call markup (e.g. deepseek-v4-flash). Added XML-tag stripping to _extract_json_object and an anti-DSML instruction to the system prompt when PromptedOutput is active. _JSON_OUTPUT_INSTRUCTION in the Claude SDK tool path also received the anti-DSML hardening.
  • Enable pin_bump periodic workflow for automated dependency pin bumping
  • Add credit_balance periodic workflow stub (.robotsix-mill/periodic/credit_balance.yaml) to enable OpenRouter credit monitoring at the library level.
  • Added a new testing convention rule to AGENT.md: when splitting, renaming, or removing test files (or adding a new tests/ sub-suite), update ARCHITECTURE.md's test coverage strategy listing in the same change to prevent documentation drift.
  • Annotate the stable request prefix (system prompt + tool schemas) with cache_control: {"type": "ephemeral"} markers on the OpenRouter path so upstream providers (DeepSeek, Anthropic, …) cache it and charge cache-read rates (~10% of full input price) on subsequent turns instead of re-billing the full prefix as fresh input. Add an INFO log line in record_openrouter_cost summarising the cached-vs-uncached input token split so the win is directly measurable in logs.
  • Removed dead robotsix_llmio.changelog module and its orphaned test; the project uses towncrier newsfragments under changelog.d/ instead.
  • Stamp llmio.stream.turn_count, llmio.stream.tool_calls, llmio.stream.thinking_blocks, and llmio.stream.is_error OTEL span attributes from the Claude SDK streaming loop, mirroring the pattern used by core/retry.py and core/tier_fallback.py.
  • Update ARCHITECTURE.md test tree: replace stale split-file references (test_core_retry_async.py, test_tracing_live.py, test_tier.py) with their actual split children, and add 11 other test files that were missing from the listing.
  • Add OpenTelemetry span observability to tier-fallback lifecycle (_tier_fallback_loop): each tier attempt now produces a child span with llmio.tier.level, llmio.tier.provider, llmio.tier.model, llmio.tier.attempt_index, and llmio.tier.succeeded attributes; promotion events additionally stamp llmio.tier.promotions and llmio.tier.fallback_activated on the parent run span so Langfuse traces expose the full tier-escalation history.
  • Documented CI rule: do not add changelog.d/** globs to any module's paths in docs/modules.yaml — the project-root module already claims them.
  • Re-export is_openrouter_upstream_payment_error from robotsix_llmio.openrouter, matching the package's existing convention of individually exporting its transient-signature peer predicates.
  • Remove claude_sdk/model.py backward-compatibility re-export shim; all consumers migrated to the private sub-modules (_errors, _model, _prompt).
  • openrouter: add is_deepseek_reasoning_400 transient detection for DeepSeek's reasoning-content 400, wired into is_openrouter_transient so a missing-reasoning_content API error is retried instead of surfacing as terminal.
  • Split tests/core/test_core_retry_async.py (455 lines, 22 tests) into three focused modules: test_core_retry_async_parity.py, test_core_retry_async_fallback.py, and test_core_retry_async_sync_wrappers.py. Moved _HTTPErr and reused _anoop_sleep/_noop_sleep from tests/core/conftest.py.
  • Split tests/core/test_tracing_routing.py (530 lines → 211) into three files by testing strategy: routing, _StampProcessor, and _FilteredBatchSpanProcessor. Extracted shared _FakeSpan helpers to tests/core/_fake_span.py.
  • create_model() now forwards tlc.max_tokens from the tier config to the provider constructor (matching the existing behaviour of get_provider_for_level() and build_agent_for_level() in core/factory.py). Previously the baked max_tokens value was silently dropped.
  • Split tests/claude_sdk/test_stream.py (641 lines) into two files: test_stream_short_log.py (~214 lines, 18 tests) for _short/_log_stream_message/activity event callbacks, and the trimmed test_stream.py (~427 lines, 17 tests) for _stream_query. Both files are well under the 500-line community limit.
  • Split tests/core/test_tracing_live.py (824 lines, 9 tests) into two provider-scoped files: tests/core/test_tracing_live_openrouter.py (OpenRouter DeepSeek, 2 tests) and tests/core/test_tracing_live_claude.py (Claude SDK + general, 7 tests). Shared Langfuse helpers (_langfuse_creds, _require, _langfuse_traces, _langfuse_get) extracted to tests/core/conftest.py.
  • Sync CONTRIBUTING.md pre-commit hooks table with .pre-commit-config.yaml: removed check-ast, check-case-conflict, debug-statements (not configured); added codespell and deptry (configured but undocumented).
  • Added missing tests/openrouter/ test-file entries (test_async_client.py, test_openrouter_provider.py, test_openrouter_provider_cost.py) to the Test coverage strategy section of ARCHITECTURE.md.
  • Updated ARCHITECTURE.md test coverage listing: added tests/clients/ and tests/config/ directories, and expanded the tests/core/ section to cover all 29 test files.
  • Split tests/core/test_core_tier_fallback.py into test_core_tier_fallback_sync.py + test_core_tier_fallback_async.py + slimmed test_core_tier_fallback.py (isolation); extract _noop_sleep/_anoop_sleep to conftest.py
  • Updated ARCHITECTURE.md to replace stale test_core_retry.py reference with the three split files (test_core_retry_sync.py, test_core_retry_async.py, test_core_retry_properties.py).
  • Add TYPE_CHECKING block to claude_sdk/__init__.py so that mypy, pyright, and IDEs can resolve the six lazily-exported names (ClaudeSDKAPIError, ClaudeSDKModel, ClaudeSDKProvider, ClaudeSDKQueryTimeout, ClaudeSDKTurnLimitError, ClaudeSDKUsageExhaustedError) as valid module attributes — matching the pattern used by every other __init__.py in the project.
  • Re-export RefdocsSettings at the top-level robotsix_llmio package so callers of build_refdocs_tools can construct its parameter type without reaching into the internal clients.refdocs subpackage.
  • Updated ARCHITECTURE.md test listing: replaced stale test_claude_sdk.py entry with the 10 topic-specific files under tests/claude_sdk/, and added test_core_tier_fallback.py / test_core_tier_fallback_next_tier.py to the tests/core/ section.
  • Split claude_sdk.model into three cohesive modules: _errors (exception classes), _prompt (prompt/image helpers), and _model (ClaudeSDKModel + constants). model.py remains a backward-compatible re-export shim. Internal consumers updated to import from the specific sub-modules.
  • Split tests/core/test_tracing.py (820 lines) into test_tracing_setup.py (setup + surface API) and test_tracing_routing.py (trace routing + span processors), matching the existing topic-split pattern.
  • Remove dead periodic workflow configs state_sync.yaml and security_posture.yaml — both are either internal-only or absent from the available workflow catalog.
  • Fix: when extra_transient returns False in _stream_query, wrap the exception in ClaudeSDKAPIError instead of propagating it raw, so all non-RobotsixLLMIOError exceptions from the Claude SDK are consistently wrapped for a uniform cross-provider error surface.
  • Add ClaudeSDKAPIError (subclass of RobotsixLLMIOError) to wrap terminal claude_agent_sdk transport/process failures at the provider boundary, so callers catching RobotsixLLMIOError consistently cover all three provider paths (OpenRouter, REST clients, Claude SDK). Raw SDK exceptions like CLIConnectionError / ProcessError that exhaust their transient retries are now surfaced as ClaudeSDKAPIError — a minor break for any caller currently catching raw claude_agent_sdk types directly.
  • Refactor claude_sdk/transient.py exception-chain walks to use the shared _walk_cause_chain generator from core.retry, removing ~20 lines of duplicated bounded-loop boilerplate.
  • Consolidated repetitive test functions in tests/core/test_langfuse_cost.py from 22 to 10 using @pytest.mark.parametrize across six groups (_parse_timestamp, _observation_provider, _observation_cost, fetch_logged_cost, fetch_by_provider, prune_before).
  • Extract shared _parse_key_usage helper in provider_cost.py, replacing duplicate inline KeyUsage construction in sync and async OpenRouter clients.
  • Remove dead Pydantic v1 .dict() fallback in _to_dict() (src/robotsix_llmio/config/loader.py). The project requires pydantic>=2, so the backward-compat try/except for .dict() was unreachable.
  • Inline robotsix-http retry primitives directly into core/retry.py (RetryConfig, _compute_backoff, _walk_cause_chain, _status, is_transient) so the library is importable without the git dependency. Remove robotsix-http from pyproject.toml dependencies and tool.uv.sources.
  • Replace duplicated HTTP retry primitives with robotsix-http. The generic RetryConfig, _compute_backoff, _walk_cause_chain, _status, and is_transient symbols are now imported from robotsix_http.retry instead of inlined. The loop-free _drive_sync and all LLM-domain logic (rate-limit handling, fallback, OTel span recording) stay local.
  • Add deptry to dev dependencies, pre-commit hooks, and CI to catch misplaced/unused dependencies automatically.
  • Remove redundant hand-rolled audit job from CI workflow; the shared python-ci.yml already runs uv audit via its default run-audit: true input.
  • Add codespell to pre-commit hooks to catch common misspellings in docstrings and comments.
  • Add max_tokens field to TierLevelConfig with per-level baked defaults (level 1: 4096, level 2: 8192, level 3: 8192, level 4: 16384), plumbed through the Claude SDK transport as task_budget to cap output cost.
  • Add trace_review periodic to .robotsix-mill/periodic/ for automated trace quality inspection via Langfuse.
  • Enable changelog_autofill periodic task for automated changelog entry commits.
  • Extract shared _deny_hook_output() helper in _confinement.py to deduplicate the deny-block structure between _make_confine_hook() and _make_bash_confine_hook()
  • Extract shared _insert_into_format() helper from the near-duplicate _insert_into_md() and _insert_into_rst() functions in changelog.py; format-specific differences are now injected via callbacks, removing ~70% duplication.
  • Remove stale _get_json entry from vulture whitelist; the function was already deleted when core/_rest_client.py was simplified to only the _DEFAULT_BASE_URL constant.
  • Convert all NumPy-style docstrings (Parameters/Returns/Raises sections) to Google-style (Args:/Returns:/Raises:) for correct rendering by mkdocstrings' default parser Add ruff pydocstyle rules (D100, D101, D103, D400, D412, D413, D414, D417) to enforce consistent docstring formatting
  • Enable health periodic agent for broad codebase health scanning across all eight dimensions.
  • Enable survey periodic workflow — creates .robotsix-mill/periodic/survey.yaml name-only stub so robotsix-mill's built-in survey agent discovers this repo.
  • Enable periodic audit agent for broad-spectrum codebase health assessment.
  • Remove security_posture periodic agent opt-in (policy enforcement now lives in robotsix-standards audit)
  • Document the dual CVE-ignore mechanism in AGENT.md and CONTRIBUTING.md — when adding a vulnerability ignore, both [tool.uv.audit].ignore in pyproject.toml and pip-audit-ignore-vulns in ci.yml must be updated.
  • Ignore CVE-2026-59950 (GHSA-vj7q-gjh5-988w) in uv audit — the vulnerable mcp==1.27.2 is a transitive dependency via claude-agent-sdk with no upstream fix yet available.
  • setup_logging is now re-exported from the top-level robotsix_llmio package, matching the pattern of other public APIs. Import it as from robotsix_llmio import setup_logging.
  • Removed the orphaned src/robotsix_llmio/refdocs/ package (5 files), which was superseded by src/robotsix_llmio/clients/refdocs/ and had no remaining callers or tests. Also removed the now-unreferenced _get_json helper from core/_rest_client.py.
  • Claude SDK provider now accepts tools whose ctx parameter has a default value (e.g. ctx: RunContext[None] = None): the function is invoked without ctx, letting the default apply. Only tools with a required ctx (no default) still raise UserError at build time.
  • Add module_curator periodic agent to keep docs/modules.yaml synchronized with the live directory tree.
  • Remove orphaned robotsix_llmio.knowledge and robotsix_llmio.self_review backward-compatibility packages (dead code — all consumers use robotsix_llmio.clients.knowledge and robotsix_llmio.clients.self_review).
  • Enable bc_check and test_gap periodic agents via minimal presence files under .robotsix-mill/periodic/.
  • Fix docs/modules.yaml: restore config entry to its consumer-facing scope (TierConfig schema, loader, create_model factory) and re-add the dev-tooling module for repo tooling/config files that were incorrectly merged into config.
  • Consolidated refdocs, knowledge, and self_review modules under a shared clients/ parent with common BaseHttpClient in _base.py (already completed by sibling ticket; no additional changes needed).
  • Extract shared _MARKERS tuple + isinstance pattern for pydantic-ai output-mode markers into a single core/_output_markers.py helper, removing the identical duplicated definition from core/provider.py and claude_sdk/provider.py.
  • Internal boilerplate: registered doc_classifier: internal-only pattern for non-user-facing changes that skip the doc agent
  • Removed stale changelog.d/ directory and its orphaned newsfragments; updated CONTRIBUTING.md and docs/modules.yaml to reference changes/ instead.
  • Add robotsix_llmio.changelog.insert_changelog_entry — detects the project's existing changelog format (CHANGELOG.rst, CHANGELOG.md, CHANGELOG, in that order) before inserting a bullet entry under the unreleased section. Falls back to CHANGELOG.md when no changelog file exists, preventing orphan .md files on RST-based projects.
  • Extract shared REST client _get_json helper into core/_rest_client.py, deduplicating the near-identical _get() methods from KnowledgeClient, SelfReviewClient, and AsyncRefdocsClient. The shared _DEFAULT_BASE_URL constant is also moved there.
  • Split src/robotsix_llmio/claude_sdk/_tool_agent.py (802 lines) into four focused private submodules: _output.py (structured JSON parsing), _tool_converter.py (pydantic-ai → SDK MCP tool conversion), _confinement.py (workspace path-traversal hooks), and _chat_messages.py (tracing chat-message rendering). The original module now holds only _SdkToolResult and _SdkToolAgentHandle (~470 lines).
  • TierConfigLoadError now inherits from RobotsixLLMIOError instead of Exception, so it's caught by a single except RobotsixLLMIOError clause as the library's exception contract documents.
  • Add Hypothesis property-based tests for the transient retry backoff formula (boundedness, non-negativity, jitter range, monotonicity).
  • Added robotsix-modules as a dev dependency and a CI step (robotsix-modules-validate docs/modules.yaml) to enforce module taxonomy consistency.
  • AGENT.md: replace two upstreamed rules with cross-references to the robotsix standards repo; align .pre-commit-config.yaml to the standard hook set (remove debug-statements, check-ast, check-case-conflict; check-json and detect-private-key already present).
  • CI: resolve all zizmor (pedantic) workflow-lint findings — add explanatory comments to write permissions, name the anonymous jobs, deny-by-default top-level permissions on dependabot-auto-merge/docs, and a concurrency group on dependency-review. Unblocks Lint workflows on main.
  • Consolidated refdocs, knowledge, and self_review modules under a shared clients/ parent, extracting duplicated _get() logic into a common BaseHttpClient in clients/_base.py. Import paths are now robotsix_llmio.clients.{refdocs,knowledge,self_review}.
  • Extract shared _retry_loop in core/retry.py and _tier_fallback_loop in core/tier_fallback.py, eliminating ~250 lines of duplicated sync/async retry and tier-escalation logic. Each public call_with_retry / acall_with_retry and call_with_tier_fallback / acall_with_tier_fallback is now a ~5-line thin shim that passes sync or async invoke/sleep adapters into the shared core. run.py likewise extracts _run_with_trace_and_close to deduplicate the trace-span boilerplate between run_agent and arun_agent.
  • Extract shared retry-loop helpers _compute_backoff, _handle_rate_limit, and _handle_transient from duplicated sync/async variants in core/retry.py.
  • Fix README environment-variable table: LLMIO_LEVEL{1,2,3}_MODEL and LLMIO_LEVEL{1,2,3}_PROVIDER_KWARGS updated to {1,2,3,4} to match the actual four-tier configuration system (Level 4 was already supported in code and docs/config/index.md but missing from the README table).
  • Re-export AsyncRefdocsClient, RefdocsClientError, and build_refdocs_tools from the top-level robotsix_llmio package (sibling-pattern gap with knowledge and self_review sub-packages).
  • Remove dead Langfuse v1 createdAt field fallbacks from _to_record and _observation_to_record in langfuse_cost.py
  • Remove stale Keep a Changelog content from CHANGELOG.md — the file is now fully towncrier-managed (release-workflow-written only).

  • Export record_cost and flush_current_provider from core.cost via core.__init__ (TYPE_CHECKING, __all__, and _SUBMODULE_ATTRS), matching the pattern of every other core submodule.

  • Export run_multi_table_migrations from core.__init__ (TYPE_CHECKING, __all__, _SUBMODULE_ATTRS) — it was the only public symbol in core.sqlite_utils missing from the package's public API.
  • Add check-added-large-files, check-ast, and check-case-conflict pre-commit hooks from pre-commit-hooks.
  • Add Dependabot auto-merge caller workflow (.github/workflows/dependabot-auto-merge.yml) so dependabot PRs auto-merge once required checks pass.
  • Remove .github/workflows/release.yml: per robotsix-standards, first-party libraries are consumed from git via uv [tool.uv.sources], not from PyPI. No packages are published to PyPI.
  • Add robotsix-standards reference link to README.md and AGENT.md.
  • Centralise four environment-variable name strings into module-level constants (_ENV_LOG_LEVEL, _ENV_LOG_FORMAT, _ENV_OPENROUTER_API_KEY, _ENV_REFDOCS_API_KEY) in logging.py, openrouter/provider.py, and refdocs/_settings.py, following the ENV_LANGFUSE_* pattern in core/_otel.py.
  • Add site_url to mkdocs.yml to fix MkDocs 1.6+ sitemap generation, social card images, canonical links, and 404 page asset paths.
  • Introduced LangfuseClientError(RobotsixLLMIOError) in core.langfuse_client, replacing bare RuntimeError at all Langfuse HTTP/auth/iteration-limit sites, and re-exported it from both robotsix_llmio.core and the top-level robotsix_llmio package so consumers can catch Langfuse-specific errors by type.
  • Fix [project.urls] in pyproject.toml: rename Source to Repository, point Documentation to the deployed MkDocs site, and add a Changelog URL.
  • Fix README CI badge URL (was pointing at robotsix-mill instead of robotsix-llmio) and clarify env var scoping of LLMIO_LEVEL<N>_* variables in get_provider_for_level docs. Remove stale "follow-up concern" sentence from tier.py module docstring.
  • Fix stale references in CONTRIBUTING.md: remove bandit (replaced by ruff S rules), fix mypy override module name (openrouter_deepseek → openrouter), update layer diagram, correct GitHub org (robotsix-dev → damien-robotsix).
  • Corrected stale documentation claims across six doc files: removed YAML references from load_tier_config entries, fixed new_model signature in core docs, removed mention of removed bracket-qualifier feature from ParsedIdentifier, updated ClaudeSDKTurnLimitError to reflect _MAX_TURNS agent-loop cap, corrected OpenRouterProvider description (mapping is in TierConfig), removed false claim that openrouter extra is the default, and removed obsolete "transport aliases" references.
  • Fix check-then-act race in _StampProcessor.on_start trace naming: consolidate two separate lock acquisitions into a single critical section covering the check, name computation, attribute set, and set insertion, so concurrent spans of the same trace cannot both observe the guard as unset.
  • Update ARCHITECTURE.md: fix stale references to the deleted openrouter_deepseek package, correct OpenRouterProvider from abstract to concrete, update PEP 562 lazy-import coverage list, fix test paths, and align extras list with pyproject.toml.
  • Remove vestigial from __future__ import annotations from core/constants.py, refdocs/_base.py, and exceptions.py where no PEP 604 unions or forward references exist.
  • ClaudeSDK provider: fix build_agent(level=1, output_type=MyModel) raising UserError because the DeepSeek-specific level-gate in _resolve_output_type left the raw model unwrapped. The no-tools path now wraps non-str structured types in PromptedOutput at all levels before delegating to super().
  • Fix OpenRouterProvider.new_model resource leak: close httpx.AsyncClient when any constructor (pydantic-ai provider, AsyncOpenAI, model class, or _post_build_model) raises, instead of leaking the client to GC.
  • Fix backoff jitter applied after the cap in transient retry logic, which allowed sleep times to reach 1.5× the documented TRANSIENT_BACKOFF_CAP. Jitter is now applied to the raw exponential value before capping, so the final delay never exceeds the cap.
  • Fix call_with_retry / acall_with_retry: rate-limit (UsageLimitExceeded) on the last retry attempt now correctly triggers the one-shot fallback_fn instead of re-raising immediately. Fallback activation no longer consumes a transient-retry slot — the fallback always gets the same full retry budget as the primary.
  • Fix extra_body.provider override suppressing the per-tier reasoning policy in OpenRouterDeepseekModel._inject_pin. Custom provider routing now coexists with reasoning injection (reasoning is injected independently of the provider pin).
  • Add Bash command workspace confinement for claude_sdk tool agents: a new PreToolUse hook denies Bash commands referencing absolute paths outside workspace_root, closing a bypass that allowed host-file mutation via shell redirects and hardlinks even when the edit-tool confinement hook was in place.
  • build(deps): bump actionlint from v1.7.7 to v1.7.12
  • build(deps): bump ruff-pre-commit from v0.15.18 to v0.15.20
  • Add .github/workflows/dependency-review.yml to gate PRs against known-vulnerable dependencies using actions/dependency-review-action@v5.0.0 with fail-on-severity: moderate and an allow-list of common open-source licenses.
  • Define RefdocsClientError(RobotsixLLMIOError) in refdocs/__init__.py and use it in _async_client._get() instead of bare RuntimeError, consistent with the typed-exception pattern in knowledge/ and self_review/.
  • Define OpenRouterAPIError (subclass of RobotsixLLMIOError) and raise it instead of bare RuntimeError in the OpenRouter transport, provider, and cost-source modules. Re-export from the top-level package.
  • Add security_posture periodic workflow to .robotsix-mill/periodic/ for automated security posture review.