@@ -59,7 +59,6 @@ let buildProviderAuthDoctorHintWithPlugin: typeof import("./provider-runtime.js"
5959let buildProviderMissingAuthMessageWithPlugin : typeof import ( "./provider-runtime.js" ) . buildProviderMissingAuthMessageWithPlugin ;
6060let buildProviderUnknownModelHintWithPlugin : typeof import ( "./provider-runtime.js" ) . buildProviderUnknownModelHintWithPlugin ;
6161let applyProviderNativeStreamingUsageCompatWithPlugin : typeof import ( "./provider-runtime.js" ) . applyProviderNativeStreamingUsageCompatWithPlugin ;
62- let applyProviderConfigDefaultsWithPlugin : typeof import ( "./provider-runtime.js" ) . applyProviderConfigDefaultsWithPlugin ;
6362let formatProviderAuthProfileApiKeyWithPlugin : typeof import ( "./provider-runtime.js" ) . formatProviderAuthProfileApiKeyWithPlugin ;
6463let loginProviderOAuthWithPlugin : typeof import ( "./provider-runtime.js" ) . loginProviderOAuthWithPlugin ;
6564let classifyProviderFailoverSignalWithPlugin : typeof import ( "./provider-runtime.js" ) . classifyProviderFailoverSignalWithPlugin ;
@@ -75,11 +74,8 @@ let resolveProviderFollowupFallbackRoute: typeof import("./provider-runtime.js")
7574let resolveProviderStreamFn : typeof import ( "./provider-runtime.js" ) . resolveProviderStreamFn ;
7675let resolveProviderTransportTurnStateWithPlugin : typeof import ( "./provider-runtime.js" ) . resolveProviderTransportTurnStateWithPlugin ;
7776let resolveProviderCacheTtlEligibility : typeof import ( "./provider-runtime.js" ) . resolveProviderCacheTtlEligibility ;
78- let createProviderEmbeddingProvider : typeof import ( "./provider-runtime.js" ) . createProviderEmbeddingProvider ;
79- let resolveRuntimeThinkingProfile : typeof import ( "./provider-runtime.js" ) . resolveRuntimeThinkingProfile ;
8077let resolveProviderModernModelRef : typeof import ( "./provider-runtime.js" ) . resolveProviderModernModelRef ;
8178let resolveProviderReasoningOutputModeWithPlugin : typeof import ( "./provider-runtime.js" ) . resolveProviderReasoningOutputModeWithPlugin ;
82- let resolveProviderReplayPolicyWithPlugin : typeof import ( "./provider-runtime.js" ) . resolveProviderReplayPolicyWithPlugin ;
8379let resolveProviderSystemPromptContribution : typeof import ( "./provider-runtime.js" ) . resolveProviderSystemPromptContribution ;
8480let resolveExternalAuthProfilesWithPlugins : typeof import ( "./provider-runtime.js" ) . resolveExternalAuthProfilesWithPlugins ;
8581let resolveProviderSyntheticAuthWithPlugin : typeof import ( "./provider-runtime.js" ) . resolveProviderSyntheticAuthWithPlugin ;
@@ -96,7 +92,6 @@ let prepareProviderRuntimeAuth: typeof import("./provider-runtime.js").preparePr
9692let refreshProviderOAuthCredentialWithPlugin : typeof import ( "./provider-runtime.js" ) . refreshProviderOAuthCredentialWithPlugin ;
9793let resolveProviderOAuthCredentialWithPlugin : typeof import ( "./provider-runtime.js" ) . resolveProviderOAuthCredentialWithPlugin ;
9894let resolveProviderRuntimePlugin : typeof import ( "./provider-runtime.js" ) . resolveProviderRuntimePlugin ;
99- let providerRuntimeTesting : typeof import ( "./provider-runtime.js" ) . testing ;
10095let runProviderDynamicModel : typeof import ( "./provider-runtime.js" ) . runProviderDynamicModel ;
10196let validateProviderReplayTurnsWithPlugin : typeof import ( "./provider-runtime.js" ) . validateProviderReplayTurnsWithPlugin ;
10297let wrapProviderSimpleCompletionStreamFn : typeof import ( "./provider-runtime.js" ) . wrapProviderSimpleCompletionStreamFn ;
@@ -310,7 +305,6 @@ describe("provider-runtime", () => {
310305 buildProviderMissingAuthMessageWithPlugin,
311306 buildProviderUnknownModelHintWithPlugin,
312307 applyProviderNativeStreamingUsageCompatWithPlugin,
313- applyProviderConfigDefaultsWithPlugin,
314308 applyProviderResolvedTransportWithPlugin,
315309 classifyProviderFailoverSignalWithPlugin,
316310 formatProviderAuthProfileApiKeyWithPlugin,
@@ -326,11 +320,8 @@ describe("provider-runtime", () => {
326320 resolveProviderStreamFn,
327321 resolveProviderTransportTurnStateWithPlugin,
328322 resolveProviderCacheTtlEligibility,
329- createProviderEmbeddingProvider,
330- resolveRuntimeThinkingProfile,
331323 resolveProviderModernModelRef,
332324 resolveProviderReasoningOutputModeWithPlugin,
333- resolveProviderReplayPolicyWithPlugin,
334325 resolveProviderSystemPromptContribution,
335326 resolveExternalAuthProfilesWithPlugins,
336327 resolveProviderSyntheticAuthWithPlugin,
@@ -347,7 +338,6 @@ describe("provider-runtime", () => {
347338 refreshProviderOAuthCredentialWithPlugin,
348339 resolveProviderOAuthCredentialWithPlugin,
349340 resolveProviderRuntimePlugin,
350- testing : providerRuntimeTesting ,
351341 runProviderDynamicModel,
352342 validateProviderReplayTurnsWithPlugin,
353343 wrapProviderSimpleCompletionStreamFn,
@@ -362,7 +352,6 @@ describe("provider-runtime", () => {
362352
363353 beforeEach ( ( ) => {
364354 resetPluginRuntimeStateForTest ( ) ;
365- providerRuntimeTesting . clearProviderRuntimePluginCacheForTest ( ) ;
366355 resolvePluginProvidersMock . mockReset ( ) ;
367356 resolvePluginProvidersMock . mockReturnValue ( [ ] ) ;
368357 isPluginProvidersLoadInFlightMock . mockReset ( ) ;
@@ -1678,67 +1667,6 @@ describe("provider-runtime", () => {
16781667 } ) ;
16791668 } ) ;
16801669
1681- it ( "resolves thinking profiles from bundled policy surface before runtime plugins" , ( ) => {
1682- const resolveThinkingProfile = vi . fn ( ( ) => ( {
1683- levels : [ { id : "off" as const } ] ,
1684- defaultLevel : "off" as const ,
1685- } ) ) ;
1686- resolveBundledProviderPolicySurfaceMock . mockReturnValue ( {
1687- resolveThinkingProfile,
1688- } ) ;
1689-
1690- expect (
1691- resolveRuntimeThinkingProfile ( {
1692- provider : "xai" ,
1693- context : {
1694- provider : "xai" ,
1695- modelId : "grok-4.3" ,
1696- reasoning : true ,
1697- } ,
1698- } ) ,
1699- ) . toEqual ( { levels : [ { id : "off" } ] , defaultLevel : "off" } ) ;
1700-
1701- expect ( resolveThinkingProfile ) . toHaveBeenCalledTimes ( 1 ) ;
1702- expect ( resolvePluginProvidersMock ) . not . toHaveBeenCalled ( ) ;
1703- } ) ;
1704-
1705- it ( "resolves provider config defaults through owner plugins" , ( ) => {
1706- resolvePluginProvidersMock . mockReturnValue ( [
1707- {
1708- id : "anthropic" ,
1709- label : "Anthropic" ,
1710- auth : [ ] ,
1711- applyConfigDefaults : ( { config } ) => ( {
1712- ...config ,
1713- agents : {
1714- defaults : {
1715- heartbeat : { every : "1h" } ,
1716- } ,
1717- } ,
1718- } ) ,
1719- } ,
1720- ] ) ;
1721-
1722- expect (
1723- applyProviderConfigDefaultsWithPlugin ( {
1724- provider : "anthropic" ,
1725- context : {
1726- provider : "anthropic" ,
1727- env : { } ,
1728- config : { } ,
1729- } ,
1730- } ) ,
1731- ) . toEqual ( {
1732- agents : {
1733- defaults : {
1734- heartbeat : {
1735- every : "1h" ,
1736- } ,
1737- } ,
1738- } ,
1739- } ) ;
1740- } ) ;
1741-
17421670 it ( "resolves failover classification through hook-only aliases" , ( ) => {
17431671 resolvePluginProvidersMock . mockReturnValue ( [
17441672 {
@@ -2115,18 +2043,6 @@ describe("provider-runtime", () => {
21152043 resolveExternalAuthProfileProviderPluginIdsMock . mockReturnValue ( [ "demo" ] ) ;
21162044 const prepareDynamicModel = vi . fn ( async ( ) => undefined ) ;
21172045 const createStreamFn = vi . fn ( ( ) => vi . fn ( ) ) ;
2118- const createEmbeddingProvider = vi . fn ( async ( ) => ( {
2119- id : "demo" ,
2120- model : "demo-embed" ,
2121- embedQuery : async ( ) => [ 1 , 0 , 0 ] ,
2122- embedBatch : async ( ) => [ [ 1 , 0 , 0 ] ] ,
2123- client : { token : "embed-token" } ,
2124- } ) ) ;
2125- const buildReplayPolicy = vi . fn ( ( ) => ( {
2126- sanitizeMode : "full" as const ,
2127- toolCallIdMode : "strict9" as const ,
2128- allowSyntheticToolResults : true ,
2129- } ) ) ;
21302046 const sanitizeReplayHistory = vi . fn (
21312047 async ( {
21322048 messages,
@@ -2195,7 +2111,6 @@ describe("provider-runtime", () => {
21952111 ...providerConfig ,
21962112 compat : { supportsUsageInStreaming : true } ,
21972113 } ) ,
2198- buildReplayPolicy,
21992114 sanitizeReplayHistory,
22002115 validateReplayTurns,
22012116 normalizeToolSchemas,
@@ -2210,7 +2125,6 @@ describe("provider-runtime", () => {
22102125 expect ( model ) . toEqual ( MODEL ) ;
22112126 return streamFn ;
22122127 } ,
2213- createEmbeddingProvider,
22142128 resolveSyntheticAuth,
22152129 resolveExternalAuthProfiles : ( { store } ) : ProviderExternalAuthProfile [ ] =>
22162130 store . profiles [ "demo:managed" ]
@@ -2338,19 +2252,6 @@ describe("provider-runtime", () => {
23382252 } ) ,
23392253 } ) ;
23402254
2341- expect (
2342- resolveProviderReplayPolicyWithPlugin ( {
2343- provider : DEMO_PROVIDER_ID ,
2344- context : createDemoResolvedModelContext ( {
2345- modelApi : MODEL . api ,
2346- } ) ,
2347- } ) ,
2348- ) . toEqual ( {
2349- sanitizeMode : "full" ,
2350- toolCallIdMode : "strict9" ,
2351- allowSyntheticToolResults : true ,
2352- } ) ;
2353-
23542255 expect (
23552256 resolveProviderReasoningOutputModeWithPlugin ( {
23562257 provider : DEMO_PROVIDER_ID ,
@@ -2380,21 +2281,6 @@ describe("provider-runtime", () => {
23802281 ) . toBeTypeOf ( "function" ) ;
23812282
23822283 await expectResolvedMatches ( [
2383- {
2384- actual : ( ) =>
2385- createProviderEmbeddingProvider ( {
2386- provider : DEMO_PROVIDER_ID ,
2387- context : createDemoProviderContext ( {
2388- config : { } as never ,
2389- model : "demo-embed" ,
2390- } ) ,
2391- } ) ,
2392- expected : {
2393- id : "demo" ,
2394- model : "demo-embed" ,
2395- client : { token : "embed-token" } ,
2396- } ,
2397- } ,
23982284 {
23992285 actual : ( ) =>
24002286 prepareProviderRuntimeAuth ( {
@@ -2647,7 +2533,6 @@ describe("provider-runtime", () => {
26472533 await expectAugmentedCodexCatalog ( augmentModelCatalogWithProviderPlugins ) ;
26482534
26492535 expectCalledOnce (
2650- buildReplayPolicy ,
26512536 prepareDynamicModel ,
26522537 sanitizeReplayHistory ,
26532538 validateReplayTurns ,
0 commit comments