@@ -11,6 +11,7 @@ import {
1111} from "./model-selection.js" ;
1212import { getQaProvider } from "./providers/index.js" ;
1313import { DEFAULT_QA_PROVIDER_MODE } from "./providers/index.js" ;
14+ import { QA_FRONTIER_PROVIDER_IDS } from "./providers/live-frontier/catalog.js" ;
1415import type { QaThinkingLevel } from "./qa-thinking.js" ;
1516import type { QaTransportGatewayConfig } from "./qa-transport.js" ;
1617import type { RuntimeId } from "./runtime-parity.js" ;
@@ -27,6 +28,7 @@ export const DEFAULT_QA_CONTROL_UI_ALLOWED_ORIGINS = Object.freeze([
2728export const QA_BASE_RUNTIME_PLUGIN_IDS = Object . freeze ( [ "acpx" , "memory-core" ] ) ;
2829export const QA_CODEX_OPENAI_CATALOG_BASE_URL = "https://api.openai.com/v1" ;
2930const QA_LAB_PLUGIN_ID = "qa-lab" ;
31+ const QA_DIRECT_FRONTIER_PLUGIN_IDS = new Set < string > ( QA_FRONTIER_PROVIDER_IDS ) ;
3032
3133export function mergeQaControlUiAllowedOrigins ( extraOrigins ?: string [ ] ) {
3234 const normalizedExtra = ( extraOrigins ?? [ ] )
@@ -114,12 +116,15 @@ export function buildQaGatewayConfig(params: {
114116 . map ( ( pluginId ) => pluginId . trim ( ) )
115117 . filter ( ( pluginId ) => pluginId . length > 0 ) ,
116118 ) ;
119+ // Only canonical frontier provider ids are also plugin ids. Provider aliases
120+ // and custom providers rely on the explicit owner mapping supplied above.
121+ const inferredProviderPluginIds = selectedProviderIds . filter ( ( providerId ) =>
122+ QA_DIRECT_FRONTIER_PLUGIN_IDS . has ( providerId ) ,
123+ ) ;
117124 const providerSelectedPluginIds = usesCodexMockAppServer
118125 ? uniqueStrings ( [ ...configuredPluginIds , ...selectedProviderIds ] )
119126 : provider . usesModelProviderPlugins
120- ? uniqueStrings (
121- ( params . enabledPluginIds ?. length ?? 0 ) > 0 ? configuredPluginIds : selectedProviderIds ,
122- )
127+ ? uniqueStrings ( [ ...configuredPluginIds , ...inferredProviderPluginIds ] )
123128 : configuredPluginIds ;
124129 // A forced Codex cell must stage its harness even when the provider owner is
125130 // selected independently; otherwise its QA-only sandbox never takes effect.
0 commit comments