feat: relay account support with multi-format direct proxy#109
Open
icebear0828 wants to merge 1 commit intomasterfrom
Open
feat: relay account support with multi-format direct proxy#109icebear0828 wants to merge 1 commit intomasterfrom
icebear0828 wants to merge 1 commit intomasterfrom
Conversation
Support third-party relay services via API Key + Base URL, with format-aware direct proxy that bypasses Codex translation for OpenAI/Anthropic/Gemini compatible relays. - AccountEntry: type (native|relay), baseUrl, label, allowedModels, format - AccountPool: addRelayAccount(), format-aware acquire(), JWT skip for relay - CodexApi: baseUrlOverride for relay mode (simple Bearer auth, no fingerprint) - handleDirectProxy: stream pipe / simplePost for non-codex format relays - Route handlers: try format-matching relay before Codex translation - Dashboard: relay form with format dropdown, grouped account list - 45 new tests (903 total)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #105
type: "native" | "relay"discriminator on AccountEntryformat(codex/openai/anthropic/gemini). Non-codex formats bypass Codex translation — requests forward directly to the relay, responses pipe back as-isallowedModelsfiltering and format-preference inacquire()Key changes
src/auth/types.tsAccountType,RelayFormat, new fields on Entry/Info/Acquiredsrc/auth/account-pool.tsaddRelayAccount(), format-awareacquire(), JWT/quota skip, backfillsrc/proxy/codex-api.tsbaseUrlOverride, relay mode (simple Bearer, no fingerprint)src/routes/shared/direct-proxy.tschat.ts,messages.ts,gemini.tsrefresh-scheduler.ts,usage-refresher.tsAddRelayAccount.tsx,AccountCard.tsx,AccountList.tsx,Header.tsxTest plan
/v1/chat/completionsroutes to relay (verified via httpbin echo)type=native,format=nullafter restart