Repository navigation
fix(mimocode): handle 400 with cooldown + account rotation #6648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
5712364
44d501a
9cd18bf
d253fed
ec73441
6fe503f
9850015
ee4edf4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| * | ||
| * Only the "mimo-auto" model is supported (1M context, 128K output). | ||
| * Supports multiple accounts: N fingerprints → N JWTs → round-robin with cooldown. | ||
| * On 429, account enters cooldown (exponential backoff). On 401/403, JWT is re-bootstrapped. | ||
| * On 429 or 400, account enters cooldown (exponential backoff). On 401/403, JWT is re-bootstrapped. | ||
| */ | ||
|
|
||
| import * as crypto from "node:crypto"; | ||
|
|
@@ -504,6 +504,15 @@ export class MimocodeExecutor extends BaseExecutor { | |
| continue; | ||
| } | ||
|
|
||
| if (resp.status === 400) { | ||
| this.markCooldown(account); | ||
| log?.warn?.( | ||
| "MIMOCODE", | ||
| `Bad request on account ${account.fingerprint.slice(0, 8)}, trying next…` | ||
| ); | ||
| continue; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical Bug: Request-Specific 400 Errors Triggering Account Cooldown CascadeTreating HTTP
Style Guide ViolationAdditionally, this PR changes production code under RecommendationRemove this References
|
||
|
|
||
| this.markSuccess(account); | ||
| const respHeaders: Record<string, string> = {}; | ||
| resp.headers.forEach((v, k) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this comment change since we should not treat HTTP 400 as a cooldown trigger.