Repository navigation
v0.5.6
Gateway mode: awerouter serve all turns all routing.json profiles into one local endpoint. A request model name selects the profile (<profile>/auto|flash|pro, e.g. step-glm/auto); GET /v1/models advertises every alias. The existing serve run <profile> model remains unchanged, so users can migrate one client at a time or run both forms concurrently.
Added
awerouter serve all [--port N] [--host HOST] [-d]: one daemon and one port for every profile. It preserves the same-protocol proxy contract and per-profile routing/settings/providers; requests select the target profile from the model prefix, thenautoruns the usual L1–L4 pipeline whileflash/proforce that profile's destination. The gateway ignores per-profileportfields (its own--portor the normal 20128 scan is authoritative), hot-reloads profile additions/removals and every config edit, registers asgatewayforserve status, andserve stop gatewaystops it. Background mode writesserve-gateway.log.- Top-level
routing.jsondefaultProfile: optional gateway-only bare-name target forauto/flash/pro, keeping existing Claude Code tier environment variables compatible. It must name a configured profile; with multiple profiles and no default, bare names fail loudly and callers must use<profile>/...; a lone profile is its own natural default. It is not valid inside a profile and does not affect single-profile serve. - Gateway discovery and honest failures:
/v1/modelslists default bare tiers when routable plus every profile alias;/identifies gateway mode. Unknown profile, invalid tier, and endpoint/profile protocol mismatch each return a descriptive 400 naming the problem and available alternatives./v1/messages/count_tokensfollows the same alias selection and model rewrite as inference. - Gateway-specific test coverage (alias selection, forced/custom tiers, default behavior, all protocols, errors, token counting, config parsing/reload and hints) plus README/README_cn documentation.
Fixed
- The gateway's registration name (
serve status/serve stop gateway/serve-gateway.log) now comes from a singleGATEWAY_PROFILE_NAMEconstant instead of scattered literals, so no real profile namedgatewaycan collide with it inconsistently.