on main help sign in
fix: recent models dont go into the schema (#1892)
0777060Carlos Alexandro Becker
internal/config/config.go+2−1
@@ -359,8 +359,9 @@ type Config struct {
359
359
360 // We currently only support large/small as values here.
360 // We currently only support large/small as values here.
361 Models map[SelectedModelType]SelectedModel `json:"models,omitempty" jsonschema:"description=Model configurations for different model types,example={\"large\":{\"model\":\"gpt-4o\",\"provider\":\"openai\"}}"`
361 Models map[SelectedModelType]SelectedModel `json:"models,omitempty" jsonschema:"description=Model configurations for different model types,example={\"large\":{\"model\":\"gpt-4o\",\"provider\":\"openai\"}}"`
362+
362 // Recently used models stored in the data directory config.
363 // Recently used models stored in the data directory config.
363− RecentModels map[SelectedModelType][]SelectedModel `json:"recent_models,omitempty" jsonschema:"description=Recently used models sorted by most recent first"`
364+ RecentModels map[SelectedModelType][]SelectedModel `json:"recent_models,omitempty" jsonschema:"-"`
364
365
365 // The providers that are configured
366 // The providers that are configured
366 Providers *csync.Map[string, ProviderConfig] `json:"providers,omitempty" jsonschema:"description=AI provider configurations"`
367 Providers *csync.Map[string, ProviderConfig] `json:"providers,omitempty" jsonschema:"description=AI provider configurations"`
schema.json−10
@@ -63,16 +63,6 @@
63 "type": "object",
63 "type": "object",
64 "description": "Model configurations for different model types"
64 "description": "Model configurations for different model types"
65 },
65 },
66− "recent_models": {
67− "additionalProperties": {
68− "items": {
69− "$ref": "#/$defs/SelectedModel"
70− },
71− "type": "array"
72− },
73− "type": "object",
74− "description": "Recently used models sorted by most recent first"
75− },
76 "providers": {
66 "providers": {
77 "additionalProperties": {
67 "additionalProperties": {
78 "$ref": "#/$defs/ProviderConfig"
68 "$ref": "#/$defs/ProviderConfig"