feat(proxy): restore opportunistic traffic class on main#716
Conversation
42a6cff to
5a3b7be
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42a6cff511
ℹ️ 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: 5a3b7be84f
ℹ️ 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".
fa13a43 to
bad03a4
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bad03a4b42
ℹ️ 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".
bad03a4 to
f411de9
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f411de94d3
ℹ️ 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".
f411de9 to
7327639
Compare
b8c5b02 to
7f80220
Compare
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ 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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 589edbdd95
ℹ️ 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".
…idate/routing-quota # Conflicts: # app/core/balancer/__init__.py # app/core/balancer/logic.py # app/modules/proxy/load_balancer.py # frontend/src/test/mocks/handlers.ts # tests/unit/test_load_balancer.py
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43b1b17433
ℹ️ 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: c8a0f30f48
ℹ️ 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: 2d66af05d5
ℹ️ 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: a9e9180d50
ℹ️ 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". |
|
Hermes follow-up while checking the folded #737 quota-planner content: I still see merge blockers on the surviving #716 branch.
I verified #737 itself is closed/unmerged and is an ancestor of #716, so I’m leaving this on #716 rather than the closed PR. |
Summary
This is now the consolidated routing/quota/account-dashboard branch based directly on
main.The branch keeps the original opportunistic traffic-class restoration and folds the overlapping routing/quota work that was otherwise split across several open PRs. The goal is one reviewable main-based PR for account identity, additional-quota routing, sticky/fill-first selection, manual account routing policy, reset-window preference, single-account/drain behavior, security-work account authorization, live credits display, and quota phase planning.
Current head:
1aea7b33c42b3040d09383af392bbeb3ad0bb351Base:
mainFolded here:
Kept separate:
/v1/usage#832 - account display/API enhancement.Notable consolidation fixes:
headupgrades stay single-headed.Validation
Local validation for the current head:
uv run ruff check .uv run ruff format --check .uv run ty checkuv run pytest tests/unit/test_load_balancer.py tests/unit/test_select_with_stickiness.py tests/unit/test_quota_planner.py tests/integration/test_quota_planner_api.py -quv run pytest tests/unit/test_db_migrate.py tests/unit/test_db_rate_limiter.py tests/integration/test_migrations.py -quv run pytest tests/unit tests/integration -q(3094 passed, 43 skipped)bun run typecheckbun run lintbun run test -- --run(490 passed)bun run buildAdditional validation for the latest Codex review fixes:
uv run pytest tests/integration/test_additional_usage_flow.py::test_accounts_list_returns_additional_quotas tests/integration/test_proxy_chat_completions.py::test_responses_compact_opportunistic_denial_runs_before_api_key_reservation -q(2 passed)uv run pytest tests/integration/test_additional_usage_flow.py tests/integration/test_proxy_chat_completions.py -q(14 passed)uv run ruff check app/modules/accounts/repository.py app/modules/accounts/service.py app/modules/proxy/api.py tests/integration/test_additional_usage_flow.py tests/integration/test_proxy_chat_completions.pyuv run ruff format --check app/modules/accounts/repository.py app/modules/accounts/service.py app/modules/proxy/api.py tests/integration/test_additional_usage_flow.py tests/integration/test_proxy_chat_completions.pyuv run ty check app/modules/accounts app/modules/proxy tests/integration/test_additional_usage_flow.py tests/integration/test_proxy_chat_completions.pyuv run pytest tests/unit/test_proxy_utils.py::test_opportunistic_admission_scopes_single_account_to_selected_account tests/unit/test_proxy_utils.py::test_opportunistic_admission_empty_scope_when_single_account_is_outside_api_key_scope tests/integration/test_settings_api.py::test_settings_api_returns_known_additional_quota_policies -q(3 passed)uv run ruff check app/modules/proxy/service.py app/modules/settings/api.py app/modules/settings/schemas.py tests/unit/test_proxy_utils.py tests/integration/test_settings_api.pyuv run pytest tests/unit/test_load_balancer.py -q(169 passed)uv run ruff check app/modules/proxy/load_balancer.py tests/unit/test_load_balancer.pyuv run ty checkCurrent-head GitHub CI run:
1aea7b33c42b3040d09383af392bbeb3ad0bb351(https://github.com/Soju06/codex-lb/actions/runs/26793720749)uv run pytest tests/unit/test_proxy_utils.py::test_stream_responses_retries_security_work_warning_on_authorized_account tests/unit/test_proxy_utils.py::test_stream_responses_treats_missing_security_work_pool_as_optional tests/unit/test_proxy_utils.py::test_stream_responses_missing_security_work_pool_preserves_failover_budget -q(3 passed)uv run pytest tests/unit/test_proxy_utils.py::test_stream_responses_retries_security_work_warning_on_authorized_account tests/unit/test_proxy_utils.py::test_stream_responses_treats_missing_security_work_pool_as_optional tests/unit/test_proxy_utils.py::test_stream_responses_missing_security_work_pool_preserves_failover_budget tests/integration/test_additional_usage_flow.py::test_accounts_list_returns_additional_quotas tests/integration/test_proxy_chat_completions.py::test_responses_compact_opportunistic_denial_runs_before_api_key_reservation -q(5 passed)uv run ruff check app/modules/proxy/service.py tests/unit/test_proxy_utils.pyuv run ruff format --check app/modules/proxy/service.py tests/unit/test_proxy_utils.pyuv run ty check app/modules/proxy/service.py tests/unit/test_proxy_utils.pyuv run pytest tests/unit/test_load_balancer.py::test_drain_budget_safe_selection_filters_over_threshold_accounts tests/unit/test_load_balancer.py::test_burn_first_selection_honors_primary_reset_preference tests/unit/test_load_balancer.py::test_all_primary_pressured_fallback_honors_primary_reset_preference tests/unit/test_load_balancer.py::test_primary_pressured_fallback_honors_reset_bucket_before_primary_usage tests/unit/test_load_balancer.py::test_budget_safe_selection_keeps_burn_first_ahead_of_threshold -q(5 passed)uv run ruff check app/modules/proxy/load_balancer.py tests/unit/test_load_balancer.pyuv run ruff format --check app/modules/proxy/load_balancer.py tests/unit/test_load_balancer.pyuv run ty check app/modules/proxy/load_balancer.py tests/unit/test_load_balancer.pyCurrent-head CI is pending after the latest push. Codex review labels are managed by the repository synchronizer; this PR should not carry
🤖 codex: okuntil the synchronizer proves green current-head CI plus a clean current-head Codex review.