Repository navigation
Conversation
cf8165a to
b30dd7d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b30dd7d708
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77aa944d5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58bacc6b4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # app/core/balancer/logic.py # app/modules/proxy/load_balancer.py # app/modules/proxy/service.py # app/modules/settings/api.py # app/modules/settings/schemas.py # frontend/src/components/layout/status-bar.tsx # frontend/src/features/settings/components/routing-settings.tsx # frontend/src/features/settings/schemas.test.ts # frontend/src/features/settings/schemas.ts # frontend/src/test/mocks/handlers.ts # frontend/src/utils/constants.test.ts # frontend/src/utils/constants.ts # tests/integration/test_settings_api.py
Summary
Adds dashboard-selectable routing modes for quota control:
sequential_drain: drains lower-capacity accounts first until exhausted.reset_drain: drains accounts whose weekly quota reset is nearest first, while still skipping exhausted primary/weekly windows.single_account: routes eligible proxy traffic through one selected account configured from dashboard settings.Also adds a nullable
dashboard_settings.single_account_idfield, a settings dropdown that appears when single-account routing is selected, and status/settings labels for the new modes.Behavior
Single-account mode scopes normal proxy account selection to the configured account using the existing account selection path, so account status, quota exhaustion, API-key account scope, sticky behavior, and failover error handling remain centralized.
Validation
uv run pytest tests/unit/test_load_balancer.py tests/integration/test_settings_api.py -quv run pytest tests/integration/test_migrations.py::test_run_startup_migrations_drops_accounts_email_unique_with_non_cascade_fks -quv run pytest tests/integration/test_settings_api.py -quv run python -m compileall appnpm run test -- --run src/features/settings/schemas.test.ts src/features/settings/components/routing-settings.test.tsx src/utils/constants.test.ts --pool=threads --maxWorkers=1npm run buildgit diff --check