diff --git a/desktop-shared/src/main/resources/i18n/messages.properties b/desktop-shared/src/main/resources/i18n/messages.properties index dd84bcdde..8001bad58 100644 --- a/desktop-shared/src/main/resources/i18n/messages.properties +++ b/desktop-shared/src/main/resources/i18n/messages.properties @@ -938,6 +938,18 @@ provider.other.description=Connect any provider that supports the OpenAI-compati provider.template.apikey.required=Required provider.template.apikey.optional=Not required provider.template.get.apikey=Get API key → + +# OpenAI-Compatible provider template onboarding copy +provider.template.cloudflare_ai.tagline=Run AI models on Cloudflare's global edge network with Workers AI. +provider.template.cloudflare_ai.help=💡 To use Cloudflare AI:\n\n1. Find your Account ID in your Cloudflare dashboard\n2. Replace {ACCOUNT_ID} in the Base URL with it\n3. Create an API token with 'Workers AI' permission at:\n dash.cloudflare.com/profile/api-tokens +provider.template.groq.tagline=Ultra-fast inference for open-source models — Llama, Mixtral, Gemma and more. +provider.template.groq.help=💡 To use Groq:\n\n1. Get your free API key at: console.groq.com/keys\n2. Enter a model name, e.g. llama-3.1-8b-instant\n3. Click Next to browse all available models +provider.template.nvidia_nim.tagline=Run optimized AI models on NVIDIA's cloud GPU infrastructure. +provider.template.nvidia_nim.help=💡 To use NVIDIA NIM:\n\n1. Get your API key at: build.nvidia.com\n2. Enter a model name, e.g. meta/llama-3.1-8b-instruct\n3. Click Next to browse all available models +provider.template.openrouter.tagline=Access 300+ models — GPT-4o, Claude, Llama, Gemini, Mistral and more via one API. +provider.template.openrouter.help=💡 To use OpenRouter:\n\n1. Get your free API key at: openrouter.ai/keys\n2. Click Next to browse 300+ available models\n3. Many models have a free tier — no credit card needed +provider.template.together_ai.tagline=Fast, affordable inference for 100+ open-source models. +provider.template.together_ai.help=💡 To use Together AI:\n\n1. Get your API key at: api.together.ai/settings/api-keys\n2. Click Next to browse available models,\n e.g. meta-llama/Llama-3-8b-chat-hf provider.configure.new.title=Configure {0} provider.edit.title=Edit "{0}" provider.add.new=Add Provider diff --git a/desktop/src/main/kotlin/io/askimo/desktop/settings/ProviderSelectionDialog.kt b/desktop/src/main/kotlin/io/askimo/desktop/settings/ProviderSelectionDialog.kt index ff65e2595..07ce36f73 100644 --- a/desktop/src/main/kotlin/io/askimo/desktop/settings/ProviderSelectionDialog.kt +++ b/desktop/src/main/kotlin/io/askimo/desktop/settings/ProviderSelectionDialog.kt @@ -473,7 +473,7 @@ private fun providerPickerDetail( style = AppTextStyles.sectionTitle, ) Text( - text = entry.template.tagline, + text = stringResource(entry.template.taglineKey), style = AppTextStyles.bodySecondary, ) diff --git a/shared/src/main/kotlin/io/askimo/core/providers/openaicompatible/OpenAiCompatibleTemplate.kt b/shared/src/main/kotlin/io/askimo/core/providers/openaicompatible/OpenAiCompatibleTemplate.kt index afcfc5e9b..92c5dda5f 100644 --- a/shared/src/main/kotlin/io/askimo/core/providers/openaicompatible/OpenAiCompatibleTemplate.kt +++ b/shared/src/main/kotlin/io/askimo/core/providers/openaicompatible/OpenAiCompatibleTemplate.kt @@ -31,14 +31,22 @@ enum class OpenAiCompatibleTemplate( val helpText: String, /** API mode pre-selected when the user connects via this template. */ val apiMode: OpenAiApiMode = OpenAiApiMode.CHAT_COMPLETIONS, - /** - * HTTP protocol version for connections to this provider. - * All predefined cloud providers default to [HttpVersion.HTTP_2] — they run on modern - * infrastructure that supports multiplexing. Override to [HttpVersion.HTTP_1_1] only for - * providers known to have HTTP/2 issues. - */ + /** HTTP protocol version for connections to this provider. */ val httpVersion: HttpVersion = HttpVersion.HTTP_2, ) { + /** + * Resource key prefix for this template's localized onboarding copy. + * Keys follow the pattern `provider.template..tagline` / `.help`. + * The enum name (e.g. `CLOUDFLARE_AI`) is lowercased to `cloudflare_ai`. + */ + val i18nKey: String get() = "provider.template.${name.lowercase()}" + + /** Resource key for the localized one-sentence value proposition. */ + val taglineKey: String get() = "$i18nKey.tagline" + + /** Resource key for the localized multi-line setup help text. */ + val helpKey: String get() = "$i18nKey.help" + CLOUDFLARE_AI( displayName = "Cloudflare AI", initials = "CF",