feat(cliproxy): restrict Kamino credentials by model family
Merged
SH
1d ago+134+134+012345678901234567890123456789-2-2-0123456789
Changes
- Add declarative
model_familypolicies to Kamino credential mappings. - Enforce per-OAuth credential model-family exclusions in CLIProxy, preserving operator-authored exclusions.
- Expose the policy in generated
kamino-fleet.jsonand document the configuration.
Technical details
A model_family: haiku mapping excludes Claude model IDs containing opus, sonnet, or fable, so that credential can only register and route to Haiku models. Unknown families fail closed during Nix evaluation or proxy rendering.
Testing
shellspec spec/cliproxyapi_spec.sh spec/kamino_fleet_spec.sh(99 examples, 0 failures)- Nix evaluation/build of the Kamino package
bash -n, ShellCheck,nixfmt --check, andgit diff --check
Generated with Codex.
Summary by cubic
Restricts Kamino tunnel credentials to a declared model family so OAuth credentials can only route to the models they are approved for.
- Adds an optional
model_familyfield tokamino-tunnels.json; the CLIProxy start script renders it intoexcluded_modelsrules on the matching auth file before starting. - Validates the family at Nix evaluation and in the proxy renderer; unknown families fail closed instead of silently widening routes.
- Generates
kamino-fleet.jsonwith the samemodel_familyfield and strips previously generated exclusions when a policy is removed. - Sets the
claude-2738f2fb-jangly-bears6h@icloud.comcredential tohaiku, so it can no longer serve Opus, Sonnet, or Fable models.
Migration
- Any credential you want restricted needs a
model_familyentry inkamino-tunnels.json. Credentials without one keep their current behavior.