Skip to content

Commit d72040c

Browse files
committed
add validation and i8n changes
1 parent 21469bc commit d72040c

File tree

19 files changed

+218
-32
lines changed

19 files changed

+218
-32
lines changed

webview-ui/src/i18n/locales/ca/settings.json

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/settings.json

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/settings.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@
200200
"selectOptionsFirst": "Select at least one option below to enable auto-approval"
201201
},
202202
"providers": {
203-
"archgwApiKey": "Arch Gateway API Key",
204203
"providerDocumentation": "{{provider}} documentation",
205204
"configProfile": "Configuration Profile",
206205
"description": "Save different API configurations to quickly switch between providers and settings.",
@@ -210,7 +209,6 @@
210209
"nameExists": "A profile with this name already exists",
211210
"deleteProfile": "Delete Profile",
212211
"invalidArnFormat": "Invalid ARN format. Please check the examples above.",
213-
"invalidRoutingConfig": "Invalid routing config format.",
214212
"enterNewName": "Enter new name",
215213
"addProfile": "Add Profile",
216214
"renameProfile": "Rename Profile",
@@ -227,19 +225,15 @@
227225
"awsCustomArnDesc": "Make sure the region in the ARN matches your selected AWS Region above.",
228226
"archgwPreferenceConfigUse": "Enter a valid YAML configuration for Arch Gateway preference-based routing. The configuration should include the route name, model ID and the usage preferences. For example:",
229227
"archgwPreferenceConfigDesc": "Make sure the model ID exists in your arch gateway configuration.",
228+
"invalidRoutingConfig": "Invalid routing config format.",
229+
"routingConfig": "Routing Config",
230+
"usePreferenceBasedRouting": "Use preference based routing",
230231
"openRouterApiKey": "OpenRouter API Key",
231232
"getOpenRouterApiKey": "Get OpenRouter API Key",
232233
"apiKeyStorageNotice": "API keys are stored securely in VSCode's Secret Storage",
233234
"glamaApiKey": "Glama API Key",
234235
"getGlamaApiKey": "Get Glama API Key",
235236
"useCustomBaseUrl": "Use custom base URL",
236-
"usePreferenceBasedRouting": "Use preference based routing",
237-
"routingConfig": "Routing Config",
238-
"archgwPreferenceConfig": {
239-
"schemaError": "Invalid routing config schema. Error: {{error}}",
240-
"yamlError": "Invalid yaml format. Error: {{error}}"
241-
},
242-
"usePreferenceModel2": "Add another model to preference based routing",
243237
"useReasoning": "Enable reasoning",
244238
"useHostHeader": "Use custom Host header",
245239
"useLegacyFormat": "Use legacy OpenAI API format",
@@ -700,7 +694,13 @@
700694
"modelAvailability": "The model ID ({{modelId}}) you provided is not available. Please choose a different model.",
701695
"providerNotAllowed": "Provider '{{provider}}' is not allowed by your organization",
702696
"modelNotAllowed": "Model '{{model}}' is not allowed for provider '{{provider}}' by your organization",
703-
"profileInvalid": "This profile contains a provider or model that is not allowed by your organization"
697+
"profileInvalid": "This profile contains a provider or model that is not allowed by your organization",
698+
"routingConfig": {
699+
"invalidSchema": "YAML must be a list of objects, each with 'model' and 'routing_preferences' array.",
700+
"missingModelKey": "Each routing config object must have a 'model' key.",
701+
"missingPreferencesMap": "Each routing config object must have a 'routing_preferences' key with an array of preferences.",
702+
"invalidPreferences": "Each routing preference must be an object with 'name' and 'description' (both strings)."
703+
}
704704
},
705705
"placeholders": {
706706
"apiKey": "Enter API Key...",

webview-ui/src/i18n/locales/es/settings.json

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/settings.json

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/hi/settings.json

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)