Skip to content

v0.6.2

Choose a tag to compare

@github-actions github-actions released this 11 Sep 04:07

Three token-saver layers and multi-account logins: awecompress frozen-summary compression joins ODCP and RTK, subscription logins multiply via authHome, and a batch of integration hardening fixes lands with the first PyPI release of awecompress.

Added

  • awecompress profile flag ("awecompress": true, or an object tuning summaryModel ("flash" default, "pro", or a literal model id that must be declared in providers.json models), thresholdTokens, keepRecentTurns, minSpanTokens, transcriptResultCap, protectedTools, protectedFilePatterns). Ahead of ODCP/RTK, the oldest complete turns freeze into one cached summary — summary calls ride the flash (or chosen) destination with the provider's own auth, savings land in the usage log as awecompress_saved, and the frozen store is shared with the standalone proxy. Fail-open end to end; X-Awerouter-Token-Saver: off disables it with the rest. Requires pip install awerouter[compress] — awecompress is now on PyPI as 0.2.0.
  • Provider authHome field (providers.json), legal only next to an "auth": "codex" / "auth": "claude" sentinel: codex reads <authHome>/auth.json (an aweswitch account dir works as-is — ~/.config/aweswitch/accounts/codex/<name>); claude keeps its owned store at <authHome>/claude-auth.json. Absent authHome is exactly the old single-login behavior. Combined with the pool tag (gateway) or backups (profiles), same-model failover across accounts of one vendor becomes a few lines of config.
  • Per-login failover bookkeeping: rejected_auths keys on sentinel+authHome, so a dead account's double-401 excludes only that account — its sibling accounts stay eligible later in the same request. Serve-start login warnings and 503/refresh hints name the exact dir that lacks a login, one line per login.
  • awerouter config login claude <dir> / config logout claude <dir> (and codex's CODEX_HOME-aware hint, shell-quoted and Windows-safe): manage one account's login in its authHome; each claude store refreshes independently.
  • odcp profile flag ("odcp": true, or {"dedup": bool, "purgeErrors": bool | {"turns": int}}, default off). Before routing and before RTK, one pairing pass over the history applies two rules: dedup keeps only the newest output of repeated identical tool calls (same tool + normalized arguments — explicit JSON null stays distinct from an omitted key), replacing older ones with a one-line placeholder; purgeErrors strips a failed call's input strings once it is turns user messages old (default 4), keeping the error text (anthropic only — other protocols carry no error mark on the wire). Editors and task/planning tools are never rewritten — including codex's shell-wrapped apply_patch — replacements that wouldn't shrink the body are skipped, and the trailing turn is untouched. Deterministic and fail-open, with the X-Awerouter-Token-Saver: off bypass; /v1/messages/count_tokens prunes identically. Unlike RTK, pruning rewrites earlier history when a new duplicate appears or an error crosses the age threshold — an accepted prompt-cache trade. Behavior follows Opencode-DCP's public documentation (AGPL-3.0); implemented from that description, not translated. odcp_saved is logged per request and reported by usage next to rtk's; serve banner and serve status show odcp when on.

Fixed

  • awecompress summary calls to Anthropic-shaped upstreams now carry anthropic-version (the internal sender used to omit it, so Anthropic 400'd the summary call and compression silently failed open).
  • Gateway hot reload validates the fresh profiles' awecompress config (summaryModel declarations, package presence) before swapping them in — an invalid reload is skipped and the previous config keeps serving, same as the single-profile reload.
  • Codex config login/logout hints quote the CODEX_HOME path (spaces no longer break the printed command) and refuse paths containing a double quote on Windows (no set " injection into the copy-pasted command).