-
Notifications
You must be signed in to change notification settings - Fork 42k
Optimize auto tiers routing profiles in Copilot agent #333626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ import { IChatEndpoint } from '../../networking/common/networking'; | |
| import { IRequestLogger } from '../../requestLogger/common/requestLogger'; | ||
| import { IExperimentationService } from '../../telemetry/common/nullExperimentationService'; | ||
| import { ITelemetryService } from '../../telemetry/common/telemetry'; | ||
| import { AUTO_MODE_TIER_PROPERTY, autoModeTiers, defaultAutoModeTier, inlineChatAutoModeTier, isSelectableAutoModeTier, type AutoModeTier } from '../common/autoModeTiers'; | ||
| import { AUTO_MODE_TIER_PROPERTY, autoModeTiers, defaultAutoModeTier, inlineChatAutoModeTier, isSelectableAutoModeTier, normalizeAutoModeTier, type AutoModeTier } from '../common/autoModeTiers'; | ||
| import { ICAPIClientService } from '../common/capiClient'; | ||
| import type { IChatModelCapabilities, IChatModelInformation } from '../common/endpointProvider'; | ||
| import { AutoChatEndpoint } from './autoChatEndpoint'; | ||
|
|
@@ -397,16 +397,19 @@ export class AutomodeService extends Disposable implements IAutomodeService { | |
| * | ||
| * Only a non-default selection counts as explicit: the workbench materializes | ||
| * the schema default into `modelConfiguration` and strips a pick of the | ||
| * default back out when storing it, so a `balanced` entry cannot be told | ||
| * apart from "never picked" — reading it as a selection would make the inline | ||
| * pin below unreachable. | ||
| * default back out when storing it, so a `balance` entry cannot be told apart | ||
| * from "never picked" — reading it as a selection would make the inline pin | ||
| * below unreachable. | ||
| */ | ||
| private _resolveTier(chatRequest: IAutoModeRoutingRequest | undefined): AutoModeTier | undefined { | ||
| const override = this._configurationService.getConfig(ConfigKey.Advanced.AutoModeTierOverride); | ||
| if (override) { | ||
| // Normalized because the override is a raw string setting, so unlike a picker value it never | ||
| // passes through the schema filter that drops retired names. | ||
| const normalized = normalizeAutoModeTier(override); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AI Review: Only the advanced override is normalized. Existing |
||
| // The override is internal, so unlike the picker it may select `fast`. | ||
| if ((autoModeTiers as readonly string[]).includes(override)) { | ||
| return override as AutoModeTier; | ||
| if ((autoModeTiers as readonly string[]).includes(normalized)) { | ||
| return normalized as AutoModeTier; | ||
| } | ||
| this._logService.warn(`[AutomodeService] Ignoring auto tier override '${override}' — not one of [${autoModeTiers.join(', ')}].`); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.