@@ -13,6 +13,7 @@ service StateService {
1313 rpc togglePlanActMode (TogglePlanActModeRequest ) returns (Empty );
1414 rpc updateTerminalConnectionTimeout (Int64Request ) returns (Int64 );
1515 rpc updateAutoApprovalSettings (AutoApprovalSettingsRequest ) returns (Empty );
16+ rpc updateSettings (UpdateSettingsRequest ) returns (Empty );
1617}
1718
1819message State {
@@ -64,3 +65,126 @@ message AutoApprovalSettingsRequest {
6465 bool enable_notifications = 6 ;
6566 repeated string favorites = 7 ;
6667}
68+
69+ // Message for updating settings
70+ message UpdateSettingsRequest {
71+ Metadata metadata = 1 ;
72+ optional ApiConfiguration api_configuration = 2 ;
73+ optional string custom_instructions_setting = 3 ;
74+ optional string telemetry_setting = 4 ;
75+ optional bool plan_act_separate_models_setting = 5 ;
76+ optional bool enable_checkpoints_setting = 6 ;
77+ optional bool mcp_marketplace_enabled = 7 ;
78+ optional ChatSettings chat_settings = 8 ;
79+ optional int64 shell_integration_timeout = 9 ;
80+ optional bool terminal_reuse_enabled = 10 ;
81+ optional bool mcp_responses_collapsed = 11 ;
82+ }
83+
84+ // Complete API Configuration message
85+ message ApiConfiguration {
86+ // Core API fields
87+ optional string api_provider = 1 ;
88+ optional string api_model_id = 2 ;
89+ optional string api_key = 3 ; // anthropic
90+ optional string api_base_url = 4 ;
91+
92+ // Provider-specific API keys
93+ optional string cline_api_key = 5 ;
94+ optional string openrouter_api_key = 6 ;
95+ optional string anthropic_base_url = 7 ;
96+ optional string openai_api_key = 8 ;
97+ optional string openai_native_api_key = 9 ;
98+ optional string gemini_api_key = 10 ;
99+ optional string deepseek_api_key = 11 ;
100+ optional string requesty_api_key = 12 ;
101+ optional string together_api_key = 13 ;
102+ optional string fireworks_api_key = 14 ;
103+ optional string qwen_api_key = 15 ;
104+ optional string doubao_api_key = 16 ;
105+ optional string mistral_api_key = 17 ;
106+ optional string nebius_api_key = 18 ;
107+ optional string asksage_api_key = 19 ;
108+ optional string xai_api_key = 20 ;
109+ optional string sambanova_api_key = 21 ;
110+ optional string cerebras_api_key = 22 ;
111+
112+ // Model IDs
113+ optional string openrouter_model_id = 23 ;
114+ optional string openai_model_id = 24 ;
115+ optional string anthropic_model_id = 25 ;
116+ optional string bedrock_model_id = 26 ;
117+ optional string vertex_model_id = 27 ;
118+ optional string gemini_model_id = 28 ;
119+ optional string ollama_model_id = 29 ;
120+ optional string lm_studio_model_id = 30 ;
121+ optional string litellm_model_id = 31 ;
122+ optional string requesty_model_id = 32 ;
123+ optional string together_model_id = 33 ;
124+ optional string fireworks_model_id = 34 ;
125+
126+ // AWS Bedrock fields
127+ optional bool aws_bedrock_custom_selected = 35 ;
128+ optional string aws_bedrock_custom_model_base_id = 36 ;
129+ optional string aws_access_key = 37 ;
130+ optional string aws_secret_key = 38 ;
131+ optional string aws_session_token = 39 ;
132+ optional string aws_region = 40 ;
133+ optional bool aws_use_cross_region_inference = 41 ;
134+ optional bool aws_bedrock_use_prompt_cache = 42 ;
135+ optional bool aws_use_profile = 43 ;
136+ optional string aws_profile = 44 ;
137+ optional string aws_bedrock_endpoint = 45 ;
138+
139+ // Vertex AI fields
140+ optional string vertex_project_id = 46 ;
141+ optional string vertex_region = 47 ;
142+
143+ // Base URLs and endpoints
144+ optional string openai_base_url = 48 ;
145+ optional string ollama_base_url = 49 ;
146+ optional string lm_studio_base_url = 50 ;
147+ optional string gemini_base_url = 51 ;
148+ optional string litellm_base_url = 52 ;
149+ optional string asksage_api_url = 53 ;
150+
151+ // LiteLLM specific fields
152+ optional string litellm_api_key = 54 ;
153+ optional bool litellm_use_prompt_cache = 55 ;
154+
155+ // Model configuration
156+ optional int64 thinking_budget_tokens = 56 ;
157+ optional string reasoning_effort = 57 ;
158+ optional int64 request_timeout_ms = 58 ;
159+
160+ // Fireworks specific
161+ optional int64 fireworks_model_max_completion_tokens = 59 ;
162+ optional int64 fireworks_model_max_tokens = 60 ;
163+
164+ // Azure specific
165+ optional string azure_api_version = 61 ;
166+
167+ // Ollama specific
168+ optional string ollama_api_options_ctx_num = 62 ;
169+
170+ // Qwen specific
171+ optional string qwen_api_line = 63 ;
172+
173+ // OpenRouter specific
174+ optional string openrouter_provider_sorting = 64 ;
175+
176+ // VSCode LM (stored as JSON string due to complex type)
177+ optional string vscode_lm_model_selector = 65 ;
178+
179+ // Model info objects (stored as JSON strings)
180+ optional string openrouter_model_info = 66 ;
181+ optional string openai_model_info = 67 ;
182+ optional string requesty_model_info = 68 ;
183+ optional string litellm_model_info = 69 ;
184+
185+ // OpenAI headers (stored as JSON string)
186+ optional string openai_headers = 70 ;
187+
188+ // Favorited model IDs
189+ repeated string favorited_model_ids = 71 ;
190+ }
0 commit comments