hermes-kame-api-rotation.yaml 3.9 KB

12345678910111213141516171819202122232425
  1. name: hermes-kame-api-rotation
  2. repo: https://github.com/Kame696/kame-api-rotation-for-hermes
  3. sha: e8c01131c3ef771173fc40b54f6608b36f2afc42
  4. subdir: hermes-kame-api-rotation
  5. description: "Smart API key rotation: the healthiest key for every call, each 429 / RESOURCE_EXHAUSTED / quota refusal sized from its own evidence. Install with its companion hermes-kame-provider, which hands Hermes this plugin's rotating client through ProviderProfile.create_client (and create_messages_client where Hermes offers it); no core override. When Hermes has a fallback list, a reply whose model is busy, resting or slow moves down a ladder: the model the reply started on, then the main model (model.default), then the rest of the list; a model of the same provider answers inside the plugin on the same keys and endpoint, a model of another provider is handed to Hermes' own fallback (which walks the list), and a late reply can be raced by the next model of the same provider; nothing moves once part of the reply is on screen, and never_fall_back_to_another_model turns every switch off (the plugin reads the model and fallback_providers from config.yaml, read-only; no new network destination). Disclosure — /kame-keys add|import|split, and on start a key variable holding several comma-joined keys, write one auth.json pool row per key through Hermes' pool API after an owner-only plaintext backup (last 5 kept; switch: resolver_disabled); settings changed from /kame or the Desktop panel are saved as KAME_* lines in Hermes' .env; key-redacted, size-capped owner-only local logs (current file plus one previous) and a status file per profile; the Desktop panel reads that file and queues its settings requests through its own dashboard/plugin_api.py route (GET /state, POST /control, this plugin's plugin-data folder only); after Hermes' own fallback answered a reply, the Desktop page sets that conversation's model back to the model the reply started on with config.set --session (never --global; config.yaml is not written); while every key is resting and no fallback model can take over, chats (CLI, Desktop, messaging gateway) keep waiting with no total limit (each key's rest capped by max_hold_seconds) and cron runs give up after 300 s with the provider's refusal unless max_total_wait_seconds is set. Extra billed requests (chat replies only; hedge_mode off turns them all off): a late reply may also be sent to up to two more keys of the same model (about 10% of replies, 30% in \"Faster\", bursts of 3), to up to two next models of your fallback list on the same provider, keys and endpoint, and to one more model of the list when it stays silent; a busy best model may be asked again beside a reply at most every 20 s; and when keys keep coming back out of quota the next attempt asks 4, then 8, then up to 16 keys at once (probe_burst_max_legs). Titles and other background jobs are limited to a few requests and are stopped with a timeout so Hermes moves them down your own list."
  6. maintainer: Kame696
  7. tier: community
  8. category: models
  9. requires_hermes: ">=0.21.6"
  10. version: "1.8.3.1"
  11. docs_url: "https://github.com/Kame696/kame-api-rotation-for-hermes/blob/e8c01131c3ef771173fc40b54f6608b36f2afc42/hermes-kame-api-rotation/README.md"
  12. image: https://raw.githubusercontent.com/Kame696/kame-api-rotation-for-hermes/e8c01131c3ef771173fc40b54f6608b36f2afc42/assets/kame-banner.png
  13. screenshots:
  14. - https://raw.githubusercontent.com/Kame696/kame-api-rotation-for-hermes/e8c01131c3ef771173fc40b54f6608b36f2afc42/assets/panel-overview.png
  15. - https://raw.githubusercontent.com/Kame696/kame-api-rotation-for-hermes/e8c01131c3ef771173fc40b54f6608b36f2afc42/assets/panel-events.png
  16. - https://raw.githubusercontent.com/Kame696/kame-api-rotation-for-hermes/e8c01131c3ef771173fc40b54f6608b36f2afc42/assets/panel-settings.png
  17. readme: true
  18. capabilities:
  19. provides_tools: []
  20. provides_hooks:
  21. - transform_api_error_classification
  22. - post_api_request
  23. - on_session_reset
  24. provides_middleware: []
  25. requires_env: []