Repository navigation
v0.6.2
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
awecompressprofile flag ("awecompress": true, or an object tuningsummaryModel("flash"default,"pro", or a literal model id that must be declared inproviders.jsonmodels),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 asawecompress_saved, and the frozen store is shared with the standalone proxy. Fail-open end to end;X-Awerouter-Token-Saver: offdisables it with the rest. Requirespip install awerouter[compress]— awecompress is now on PyPI as 0.2.0.- Provider
authHomefield (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. AbsentauthHomeis exactly the old single-login behavior. Combined with thepooltag (gateway) orbackups(profiles), same-model failover across accounts of one vendor becomes a few lines of config. - Per-login failover bookkeeping:
rejected_authskeys 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.odcpprofile 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 JSONnullstays distinct from an omitted key), replacing older ones with a one-line placeholder; purgeErrors strips a failed call's input strings once it isturnsuser 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-wrappedapply_patch— replacements that wouldn't shrink the body are skipped, and the trailing turn is untouched. Deterministic and fail-open, with theX-Awerouter-Token-Saver: offbypass;/v1/messages/count_tokensprunes 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_savedis logged per request and reported byusagenext to rtk's; serve banner andserve statusshowodcpwhen 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 (
summaryModeldeclarations, 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/logouthints quote theCODEX_HOMEpath (spaces no longer break the printed command) and refuse paths containing a double quote on Windows (noset "injection into the copy-pasted command).