Skip to content

Comments

Add localhost embeddings support for scenario automation#3947

Draft
gryan11 wants to merge 3 commits intomicrosoft:mainfrom
gryan11:ryangabriel/semantic_search_evaluation_override
Draft

Add localhost embeddings support for scenario automation#3947
gryan11 wants to merge 3 commits intomicrosoft:mainfrom
gryan11:ryangabriel/semantic_search_evaluation_override

Conversation

@gryan11
Copy link
Member

@gryan11 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
import { IFetcherService } from '../../networking/common/fetcherService';
import { CAPIClientImpl } from './capiClientImpl';

const SCENARIO_AUTOMATION_CODE_SEARCH_URL = 'https://localhost:4443/embeddings/code/search';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.
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.

2 participants