feat(accounts): add per-account OAuth proxy support#804
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
e8a3041 to
2f42a42
Compare
|
this has been purely vibed coded, but it has been working great for me |
38eaa03 to
c8be21b
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8be21b907
ℹ️ 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".
c8be21b to
e58d3e6
Compare
e58d3e6 to
c8e031b
Compare
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This started as a local spike, but I have now rebased it onto the latest PR head and prepared a focused follow-up commit ( Current follow-up scope:
Validation run locally:
|
|
Hi. Do you have any rough estimate of how much proxy bandwidth is used when per-account proxy is enabled? For example, if an account consumes around 100 million tokens, how much traffic would go through the proxy approximately? And if usage is around 500 million tokens per week, what proxy bandwidth should I plan for? I understand it depends on request/response size, streaming overhead, retries, files, etc. I only need an approximate order of magnitude. |
|
for me working a lot, I use less than 1gb every week (with 2 accounts per proxy)... but I am having an issue with this right now... accounts get deactivated every 2 days or so and need to re-auth... not sure what yet, keep doing tests... I have deactivated the codex tls profile, still the same.. rotate usage fetch's so they do not match at the same time, and the same... keep doing more tests, will inform. |
|
@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: a7f46409b1
ℹ️ 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".
a7f4640 to
dfd585f
Compare
dfd585f to
b3afa15
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59d73dee2c
ℹ️ 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".
|
Hermes owner-review found current-head blockers that should be addressed before merge:
Additional note: the current non-outdated Codex thread about |
|
@codex review |
c0bc941 to
2bcdb27
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ 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". |
2bcdb27 to
0770ed5
Compare
uhmm not yet... the thing about proxy per account is that you can´t reuse the connection for usage fetch across all accounts, and stuff like that, as that defeats the purpose of the proxy itself and would connect accounts... also, this was stripping out the installation id header from codex, as that would also connect accounts (even through proxy)... the test I am reproducing now is generating a random installation id per account, as I thought that sending requests without one may be the reason as well. Also, fetching usage of all accounts at the same time is sort of connecting accounts (also addressed locally in my latest changes). But only 12h since deployed, usually for me they were lasting 2-3 days... so I need to wait a bit more... I do have 1 personal account (without proxy) that is never expiring, so there is some sort of reputation taking place I think... I am testing with ISP Dedicated proxies from iproyal.... It could be that the reputation of these IPs is damaged already not sure... If there are more ideas, please let me know :) |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ 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". |
Summary
Adds per-account SOCKS5 proxy support for OAuth account import and account-bound upstream egress, so proxied accounts are validated before persistence and continue using their configured proxy for
refreshes, usage, model fetches, files, HTTP responses, and WebSocket traffic.
Type of change
feat:— new user-facing feature or capabilityfix:— bug fix (no behavior change beyond the bug)refactor:— internal refactor (no behavior change, no API change)docs:— documentation onlychore:/ci:/build:— tooling, CI, packagingtest:— test-only change!after the type, e.g.feat!:or includeBREAKING CHANGE:footer)Linked issue:
OpenSpec
shape, SSE framing, OAuth flow) and preserves upstream-equivalent behavior
Change directory:
openspec/changes/add-oauth-account-proxy/Changes
accounts, plus repository/service/API contracts for storing, validating, updating, and clearing account proxy config.failure.
redirect_uritied to the registered configured callback and reuses that same URI for token exchange.Test plan