feat: pivot xai-proxy → openab-auth-proxy (generic OAuth sidecar)#891
feat: pivot xai-proxy → openab-auth-proxy (generic OAuth sidecar)#891chaodu-agent wants to merge 2 commits into
Conversation
BREAKING: xai-proxy binary renamed to openab-auth-proxy. - Extract xAI-specific OAuth values into a TOML config file - Default to xAI preset when no config is provided (backward compat) - Support any OIDC provider via auth-proxy.toml - Add AUTH_PROXY_TOKEN_PATH env var (XAI_PROXY_TOKEN_PATH still works) - Token storage moved to ~/.openab-auth-proxy/<provider>/tokens.json - Update CI workflow, Dockerfile, README, and docs - Add docs/refarch/sidecar-proxy.md for the generic pattern
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening reportdone.GitHub comment: #891 (comment) IntentPR #891 pivots the xAI-specific FeatFeature work with docs and CI cleanup. It renames the proxy package and CI workflow, adds TOML-driven provider configuration, preserves a legacy token-path env var, moves default token storage under Who It ServesPrimary beneficiaries are deployers and agent runtime operators who need OAuth in environments where the agent cannot or should not own the provider-specific auth flow. Maintainers also benefit if this removes the need to carry xAI-only proxy logic as a special case. Rewritten PromptRename Merge PitchThis should move forward if the proxy remains useful outside OpenCode. The direction is sound: generic OIDC sidecar beats keeping an xAI-specific artifact after OpenCode gained native xAI OAuth. Risk is moderate because it includes a binary rename, default token-path change, lockfile deletion, and provider generalization in one PR. The likely reviewer concern is compatibility: existing xAI proxy users need clear migration behavior, and CI must prove the renamed crate builds reproducibly. Best-Practice ComparisonOpenClaw's scheduling and durable execution model does not directly apply; this PR is auth sidecar infrastructure, not job dispatch. The relevant OpenClaw comparison is explicit delivery/routing boundaries: the sidecar should keep auth/token ownership clear and make upstream routing explicit per provider. Hermes Agent's daemon tick model and scheduled prompt persistence do not apply. The relevant Hermes lesson is self-contained execution state: token storage, config, and runtime logs should be deterministic enough for operators to debug refresh and upstream failures without reading agent internals. Implementation OptionsConservative: keep Balanced: accept the rename to Ambitious: split generic auth proxy into a reusable sidecar framework with provider presets, health/debug endpoints, structured run logs, token refresh metrics, and Helm/chart integration. This is valuable later but too broad for this PR unless the current proxy is already production-critical. Comparison Table
RecommendationTake the balanced path. Advance this to PR-Screening for Masami/Pahud follow-up, with review focused on migration safety, lockfile policy, CI coverage after the rename, and whether token/config errors are observable enough for operators. Split richer sidecar operations work into follow-up PRs after the generic rename lands cleanly. |
Summary
Pivots the xAI-specific
xai-proxysidecar intoopenab-auth-proxy— a generic OAuth proxy that works with any OIDC provider. Also recommends OpenCode's native xAI OAuth as the primary approach for OpenCode deployments.Motivation
Changes
Code
xai-proxy/→openab-auth-proxy/AUTH_PROXY_TOKEN_PATH(legacyXAI_PROXY_TOKEN_PATHstill works)~/.openab-auth-proxy/<provider>/tokens.jsonci-xai-proxy.yml→ci-auth-proxy.ymlDocs
docs/refarch/sidecar-proxy.md— reference architecture for the generic OAuth sidecar patterndocs/xai-proxy.md— rewritten to recommend native OAuth; links to refarch for sidecar approachExample: custom provider config
Breaking changes
xai-proxy→openab-auth-proxyCargo.lockremoved (CI regenerates)Closes
Supersedes #884