Skip to content

feat: Add Copilot chat and embeddings via LiteLLM - #2620

Open
Chris Trevino (darthtrevino) wants to merge 5 commits into
microsoft:mainfrom
darthtrevino:chtrevin-microsoft-litellm-provider-managed-auth
Open

Chris Trevino (darthtrevino) wants to merge 5 commits into
microsoft:mainfrom
darthtrevino:chtrevin-microsoft-litellm-provider-managed-auth

Conversation

@darthtrevino

@darthtrevino Chris Trevino (darthtrevino) commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Add explicit provider-managed authentication to GraphRAG’s existing LiteLLM completion and embedding implementations. This enables providers such as github_copilot without dummy API keys, custom adapters, or Azure managed identity workarounds.

Changes

  • Add auth_method: provider, leaving login, credential caching, token refresh, and transport to LiteLLM.
  • Omit GraphRAG credentials and reject conflicting authentication overrides.
  • Preserve existing API-key and Azure-managed-identity behavior.
  • Preserve token/request metrics when provider pricing metadata is unavailable; warn and omit unavailable costs rather than reporting zero.
  • Normalize missing/null embedding response model identifiers using the requested model while preserving model identifiers returned by the provider.
  • Document Copilot configuration and interactive authentication, with a link to upstream LiteLLM documentation.
  • Keep the existing LiteLLM dependency and lockfile unchanged.

Validation

  • 134 configuration and language-model tests passed.
  • Repository-wide formatting, lint, and type checks passed.
  • Live chat through GraphRAG → LiteLLM → Copilot succeeded: gpt-4o returned OK, using 13 total tokens.
  • Live embeddings through the same path succeeded: text-embedding-3-small returned one 1,536-dimensional vector, using 2 total tokens.
  • Normal GraphRAG metrics recorded successful requests for both.

Downstream follow-up

BenchmarkQED can adopt provider-managed authentication after a GraphRAG release containing these changes. That downstream release dependency does not block this PR.

Live probes covered basic chat and embeddings, not structured-output quality or all account/model combinations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@darthtrevino
Chris Trevino (darthtrevino) marked this pull request as ready for review November 4, 2026 21:39
@darthtrevino
Chris Trevino (darthtrevino) requested a review from a team as a code owner November 4, 2026 21:39
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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