Skip to content

docs: OIDC LLM forwarding design + implementation plans - #18

Merged
imryao merged 3 commits into
mainfrom
docs/oidc-llm-forwarding-design
Jun 14, 2026
Merged

imryao merged 3 commits into
mainfrom
docs/oidc-llm-forwarding-design

Conversation

@imryao

@imryao imryao commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Lands the design spec and the two implementation plans so subsequent PR-1 (#16) and PR-2 (#17) reference real paths on `main`.

Contents

  • `docs/superpowers/specs/2026-06-13-oidc-llm-forwarding-design.md` — full design covering rebase, OIDC bridge, refresh, security, rollout
  • `docs/superpowers/plans/2026-06-13-pr1-merge-upstream-v0.8.6.md` — step-by-step plan for the upstream merge
  • `docs/superpowers/plans/2026-06-13-pr2-oidc-llm-forwarding.md` — TDD plan for the OIDC forwarding implementation

Merge order

  1. This PR (docs only, no code changes)
  2. Merge upstream danny-avila/LibreChat @ v0.8.6 (756 commits) #16 — upstream merge
  3. feat: forward OIDC access_token to LLM gateway (replaces uid-${openidId}) #17 — OIDC forwarding (PR-2)

🤖 Generated with Claude Code

mryao and others added 3 commits June 13, 2026 16:29
Two-PR plan:
- PR-1 merges upstream danny-avila/LibreChat @ v0.8.6 (756 commits), preserving
  the legacy uid-${openidId} flow so production continues to function.
- PR-2 replaces uid-${openidId} with forwarding the user's real OIDC
  access_token as the LLM gateway credential (apiKey = access_token, per-SDK
  header chosen by the SDK). Adds ensureLLMBearer + refreshOIDCAccessToken
  helpers, a 60s pre-refresh leeway with per-user in-process dedup, and a
  startup guard rejecting non-OIDC providers when OIDC_FORWARD_TO_LLM=true.

Reuses upstream infrastructure where it already exists: federatedTokens
propagation (LibreChat-AI#9931), per-user resolveHeaders (LibreChat-AI#13616), refreshTokenGrant +
setOpenIDAuthTokens, OPENID_REUSE_MAX_SESSION_AGE_MS (LibreChat-AI#13546).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…orwarding)

PR-1 plan: step-by-step conflict resolution for the 756-commit upstream
merge to danny-avila/LibreChat @ v0.8.6, preserving fork-only customizations
and the legacy uid-${openidId} flow.

PR-2 plan: TDD-driven implementation of OIDC access_token forwarding to
the LLM gateway, in 6 commits matching the design doc structure (helper,
null-res patch, bridge, initializer wiring, legacy removal, startup guard).

Both plans live under docs/superpowers/plans/ and use checkbox-tracked
bite-sized steps suitable for subagent-driven-development or
executing-plans skills.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The PR-2 design covers chat-completion endpoints (openAI / anthropic /
custom / assistants / azureAssistants). Bedrock and google use AWS SigV4
and GCP service-account auth flows that are incompatible with
bearer-token forwarding; document the exclusion explicitly in both
section 5.3.3 (per-file insertion points) and section 6.5 (security
invariants) so future readers do not assume the omission is a bug.

Also adds the regular OpenAI Assistants initializer
(api/server/services/Endpoints/assistants/initalize.js) to the per-file
table — it was missed in the original design and added in PR-2 C8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@imryao
imryao merged commit e3afcd6 into main Jun 14, 2026
@imryao
imryao deleted the docs/oidc-llm-forwarding-design branch June 14, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant