Skip to content

KAME v1.0.9 β€” Delegated Execution

Choose a tag to compare

@Kame696 Kame696 released this 10 Aug 12:18
· 9 commits to main since this release

KAME now only CHOOSES the key. Agent Zero makes the call itself.

Up to v1.0.8 the plugin re-implemented A0's model call inside itself β€” build the request, call litellm.acompletion, parse every stream chunk, accumulate, build the result. That copy went stale on every Agent Zero release. v1.0.9 deletes it: KAME injects api_key= into Agent Zero's own unified_call / unified_turn and returns A0's result untouched.

What that buys you

  • 5 upstream symbols and litellm itself left KAME's dependency surface (watch list 14 -> 11). Agent Zero can rewrite its model layer freely.
  • Entry points are found BY SIGNATURE SHAPE, so an upstream rename is survivable β€” including a rename that also moves the method into a base class (MRO-walking shape detection).
  • A0's own internal retry loop is disabled per call, with the knob names read out of A0's source at runtime β€” so a rename there is handled automatically too.
  • Activation now ships through THREE independent doors instead of one silent single point of failure.
  • Worst case for a future A0 release: KAME prints one line and steps aside. Agent Zero keeps running, natively and unmodified.
  • A0 v2.7+ @extensible hooks on unified_call / unified_turn now fire again, and v2.8's tool_choice / provider-native function calling are inherited free.

Subscription / OAuth models are untouched
Codex, GitHub Copilot, Gemini API and xAI Grok sign in through Agent Zero's own OAuth plugin instead of with API keys. KAME reads key pools from the .env and never calls models.get_api_key β€” which is exactly where that plugin hooks in β€” so those models find no pool, take KAME's passthrough branch, and reach Agent Zero unchanged. You can rotate a pool of Gemini keys and keep a Codex subscription model in the same Agent Zero. Proven every run, on every supported version, by comparing the same call with KAME uninstalled vs installed.

Speed, measured on a real A0 v2.8 stack
A rotation off a 429 costs 0.77s and 2 network calls. Without KAME's retry-knob suppression β€” letting A0 retry the dead key first, as its defaults would β€” the same rotation costs 3.77s and 4 calls.

Unchanged for you: same rotation behavior, same settings, no new dependencies, no notifications of any kind (no email, no webhook, no telemetry).

One bad JSON no longer ends the turn
Agent Zero stops a turn after N consecutive model replies it cannot parse into a tool request, "to prevent further API charges". A0's own default for N moved 2 -> 5 in v2.8, but an install upgraded from v2.4-v2.7 keeps the tight 2 in its settings file forever - so one escaping slip from the model ends the turn while healthy keys sit idle. KAME now applies a FLOOR, never a ceiling: effective = max(A0's setting, kame_unusable_response_limit), default 5. Past that count A0's stop is honored untouched, so a model genuinely stuck in a formatting loop still cannot drain your pool. Set 0 to never interfere. Settings -> Plugins -> KAME -> Unusable-response floor.

The upgrade checker also understands version-gated symbols now: auditing an Agent Zero older than v2.4 reports "not present (optional)" instead of failing.

Note: the attached KAME_v1.0.9.zip is the authoritative build and is kept current; the tag points at the initial v1.0.9 commit. The Plugin Hub installs from main, so it always gets the latest 1.0.9 state.

Verified end to end β€” real classes, real key rotation β€” on Agent Zero v1.14, v1.20, v2.1, v2.4, v2.7 and v2.8. One code path for all six. 230 offline checks and 374 live ones, all green.