Repository navigation
refactor(github-copilot): reuse prepared embedding credentials - #130703
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 27, 2026 04:54
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 27, 2026
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.
What Problem This Solves
Copilot embedding setup already resolves authentication before discovering models, but its private provider factory still carries an unreachable authentication fallback and returns an unused client. That duplicate path obscures which layer owns credential preparation.
Why This Change Was Made
Make the private factory consume the prepared base URL, headers, model, and fetch implementation, and return the embedding provider directly. Headers and fetch are still captured after discovery, with the same static → remote → bearer-header precedence.
The existing 10-second discovery deadline, authentication selection, per-query request fanout, document batching, vector validation, error handling, redaction, cancellation, and guarded-transport cleanup are unchanged. No configuration, public SDK, or persistence changes.
User Impact
No intended user-visible behavior change. This removes an obsolete internal path while preserving Copilot memory-search behavior.
Production: +30/−65 lines, net −35. Tests: +76/−23 lines, net +53.
Evidence
Reviewed commit and CI head:
1656cf67a30df7ba146e83341145a82bf159d7ac.extensions/github-copilot/embeddings.test.tsandextensions/github-copilot/embeddings.transport.test.ts, usingnode scripts/run-vitest.mjswith one worker. These include real-socket discovery deadlines, credential redaction, and stored-profile/custom-endpoint request characterization. The characterization verifies bearer-header precedence, exact query/document request bodies, vector reordering, and normalization.git diff --checkpassed. Independent source/proof review and Codex autoreview through P2 found no actionable issues.3255882803c78de5103d2d37f7698add84f34c5dand this patch at the unchangedSsrFPolicyannotation. These isolated worktrees lack the generated SDK declaration selected by the plugin package-boundary configuration. No rule or annotation was weakened. Exact-head hosted CI passed lint, production types, test types, and all tests with the generated declarations available.