Add localhost embeddings support for scenario automation#3947
Draft
gryan11 wants to merge 3 commits intomicrosoft:mainfrom
Draft
Add localhost embeddings support for scenario automation#3947gryan11 wants to merge 3 commits intomicrosoft:mainfrom
gryan11 wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Member
gryan11
commented
Feb 23, 2026
- ScenarioAutomationCAPIClientImpl: intercepts EmbeddingsCodeSearch requests, strips CAPI auth headers, sends clean JSON to localhost:4443
- ScenarioAutomationGithubCodeSearchService: overrides getRemoteIndexState to always return Ready, bypassing production index checks
- Register MockGithubAvailableEmbeddingTypesService in scenario automation to use metis_1024_I16_Binary without hitting production endpoint
- Move all scenario-automation service overrides into the isScenarioAutomation if/else branch in services.ts
- ScenarioAutomationCAPIClientImpl: intercepts EmbeddingsCodeSearch requests, strips CAPI auth headers, sends clean JSON to localhost:4443 - ScenarioAutomationGithubCodeSearchService: overrides getRemoteIndexState to always return Ready, bypassing production index checks - Register MockGithubAvailableEmbeddingTypesService in scenario automation to use metis_1024_I16_Binary without hitting production endpoint - Move all scenario-automation service overrides into the isScenarioAutomation if/else branch in services.ts
rwoll
reviewed
Feb 24, 2026
| import { IFetcherService } from '../../networking/common/fetcherService'; | ||
| import { CAPIClientImpl } from './capiClientImpl'; | ||
|
|
||
| const SCENARIO_AUTOMATION_CODE_SEARCH_URL = 'https://localhost:4443/embeddings/code/search'; |
Member
There was a problem hiding this comment.
@gryan11 - Avoid hard coding this. I suggest adding a formal vscode setting, marked as experimental, that allows you to set the URL (and potentially specify an environment variable for auth).
By doing so, you'll be able to open vscode (outside test scenarios) and then configure it to use your local or (remote) staging endpoint to dogfood and debug.
There's similar settings: see github.copilot.advanced.debug.overrideCapiUrl and github.copilot.advanced.debug.overrideProxyUrl for an example. Essentially, you want a similar feature.
Add github.copilot.chat.advanced.debug.overrideEmbeddingsUrl setting (experimental) so the embeddings code search endpoint can be configured in VS Code settings instead of being hardcoded in ScenarioAutomationCAPIClientImpl.
When set, adds Authorization: Bearer header to embeddings requests sent to the override URL in ScenarioAutomationCAPIClientImpl.
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.