@@ -27,6 +27,14 @@ import { ClaudeProvider } from "../Services/ClaudeProvider";
2727import { ServerSettingsService } from "../../serverSettings" ;
2828import { ServerSettingsError } from "@t3tools/contracts" ;
2929
30+ const DEFAULT_CLAUDE_MODEL_CAPABILITIES : ModelCapabilities = {
31+ reasoningEffortLevels : [ ] ,
32+ supportsFastMode : false ,
33+ supportsThinkingToggle : false ,
34+ contextWindowOptions : [ ] ,
35+ promptInjectedEffortLevels : [ ] ,
36+ } ;
37+
3038const PROVIDER = "claudeAgent" as const ;
3139const BUILT_IN_MODELS : ReadonlyArray < ServerProviderModel > = [
3240 {
@@ -87,13 +95,8 @@ const BUILT_IN_MODELS: ReadonlyArray<ServerProviderModel> = [
8795export function getClaudeModelCapabilities ( model : string | null | undefined ) : ModelCapabilities {
8896 const slug = model ?. trim ( ) ;
8997 return (
90- BUILT_IN_MODELS . find ( ( candidate ) => candidate . slug === slug ) ?. capabilities ?? {
91- reasoningEffortLevels : [ ] ,
92- supportsFastMode : false ,
93- supportsThinkingToggle : false ,
94- contextWindowOptions : [ ] ,
95- promptInjectedEffortLevels : [ ] ,
96- }
98+ BUILT_IN_MODELS . find ( ( candidate ) => candidate . slug === slug ) ?. capabilities ??
99+ DEFAULT_CLAUDE_MODEL_CAPABILITIES
97100 ) ;
98101}
99102
@@ -450,7 +453,12 @@ export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(
450453 Effect . map ( ( settings ) => settings . providers . claudeAgent ) ,
451454 ) ;
452455 const checkedAt = new Date ( ) . toISOString ( ) ;
453- const models = providerModelsFromSettings ( BUILT_IN_MODELS , PROVIDER , claudeSettings . customModels ) ;
456+ const models = providerModelsFromSettings (
457+ BUILT_IN_MODELS ,
458+ PROVIDER ,
459+ claudeSettings . customModels ,
460+ DEFAULT_CLAUDE_MODEL_CAPABILITIES ,
461+ ) ;
454462
455463 if ( ! claudeSettings . enabled ) {
456464 return buildServerProvider ( {
0 commit comments