File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ describe("OpenRouterHandler", () => {
124124 const handler = new OpenRouterHandler ( { } )
125125 const logSpy = vitest . spyOn ( console , "log" ) . mockImplementation ( ( ) => { } )
126126 const model = handler . getModel ( )
127- expect ( model . id ) . toBe ( "anthropic/claude-sonnet-4" )
127+ expect ( model . id ) . toBe ( "anthropic/claude-sonnet-4.5 " )
128128 expect ( model . info . supportsPromptCache ) . toBe ( true )
129129 expect ( logSpy ) . toHaveBeenCalledWith ( "[model-cache] source:" , "default-fallback" )
130130 logSpy . mockRestore ( )
Original file line number Diff line number Diff line change @@ -2106,11 +2106,13 @@ describe("ClineProvider", () => {
21062106 apiConfiguration : testApiConfig ,
21072107 } )
21082108
2109- // Verify error handling
2110- expect ( mockOutputChannel . appendLine ) . toHaveBeenCalledWith (
2109+ // With reinit now gated on provider/model/baseUrl changes, no reinit occurs here.
2110+ // Therefore buildApiHandler is not called and no error is logged or shown.
2111+ expect ( buildApiHandler as any ) . not . toHaveBeenCalled ( )
2112+ expect ( mockOutputChannel . appendLine ) . not . toHaveBeenCalledWith (
21112113 expect . stringContaining ( "Error create new api configuration" ) ,
21122114 )
2113- expect ( vscode . window . showErrorMessage ) . toHaveBeenCalledWith ( "errors.create_api_config" )
2115+ expect ( vscode . window . showErrorMessage ) . not . toHaveBeenCalledWith ( "errors.create_api_config" )
21142116
21152117 // Verify state was still updated
21162118 expect ( mockContext . globalState . update ) . toHaveBeenCalledWith ( "listApiConfigMeta" , [
You can’t perform that action at this time.
0 commit comments