Commit Graph

6 Commits

Author SHA1 Message Date
Bruno Guidolim
7f0c098665 chore(auth): clean up duplicate JSDoc comments and improve cooldownKey
- Remove duplicate JSDoc blocks left from iterative editing
- Add @example annotations to cooldownKey() for clarity
- Handle empty/whitespace model strings in cooldownKey()
- Improve isProfileInCooldown() documentation to explain dual-check behavior
- Clarify markAuthProfileCooldown() is a convenience wrapper
2026-01-29 20:56:55 +01:00
Bruno Guidolim
33f9bcc3ce fix(auth): clear per-model cooldown on success
When a model succeeds, also clear its per-model cooldown key so
the system doesn't think it's still rate-limited.

- Add optional `model` param to markAuthProfileUsed
- Pass modelId when marking profile used in agent runner
- Add tests for per-model cooldown clearing behavior
2026-01-29 20:56:55 +01:00
Bruno Guidolim
715728c989 feat(auth): track cooldown per (auth profile + model)
Allow different models from the same provider to have independent
cooldowns. When a model hits rate limit, only that specific model
is blocked, not all models using the same auth profile.

- Add cooldownKey() helper for composite key generation
- Update isProfileInCooldown to check both per-model and profile-level
- Update markAuthProfileFailure/Cooldown with optional model param
- Pass model to cooldown checks in model-fallback and agent runner
- Add comprehensive tests for per-model cooldown behavior

Ref: #3417
2026-01-29 20:56:55 +01:00
Peter Steinberger
6d16a658e5 refactor: rename clawdbot to moltbot with legacy compat 2026-01-27 12:21:02 +00:00
Peter Steinberger
c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
2026-01-14 15:02:19 +00:00
Peter Steinberger
bcbfb357be refactor(src): split oversized modules 2026-01-14 01:17:56 +00:00