Skip to content

The agent that grows with you

fix(desktop): stop calling unreachable providers a timed-out reply

Adolan4c3da4fbe539
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index 1bcfa2ab51d..2b1d077b05d 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -5465,9 +5465,9 @@ export const deOverrides = {
`${provider} hat einen Serverfehler zurückgegeben. Versuchen Sie es gleich erneut oder wechseln Sie den Anbieter.`
},
timeout: {
- title: 'Die Antwort hat zu lange gebraucht',
+ title: 'Der KI-Dienst ist nicht erreichbar',
body: provider =>
- `${provider} hat nicht rechtzeitig geantwortet. Versuchen Sie es erneut, um die Nachricht noch einmal zu senden.`
+ `${provider} war nicht erreichbar oder hat nicht rechtzeitig geantwortet. Prüfen Sie Ihre Internetverbindung und versuchen Sie es erneut.`
},
stream_drop: {
title: 'Die Antwort wurde abgebrochen',
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index cfcfba52481..d3ef5c10a21 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -5063,8 +5063,9 @@ export const en: Translations = {
body: provider => `${provider} returned a server error. Retry in a moment or switch provider.`
},
timeout: {
- title: 'The reply timed out',
- body: provider => `${provider} did not answer in time. Retry to send it again.`
+ title: 'Could not reach the AI service',
+ body: provider =>
+ `${provider} could not be reached or did not answer in time. Check your internet connection, then retry.`
},
stream_drop: {
title: 'The reply was cut off',
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index cfc51866b27..01fa3683976 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -5456,8 +5456,9 @@ export const esOverrides = {
`${provider} devolvió un error del servidor. Reinténtalo en un momento o cambia de proveedor.`
},
timeout: {
- title: 'Se agotó el tiempo de la respuesta',
- body: (provider: string) => `${provider} no respondió a tiempo. Reinténtalo para enviarlo de nuevo.`
+ title: 'No se pudo conectar con el servicio de IA',
+ body: (provider: string) =>
+ `No se pudo conectar con ${provider} o no respondió a tiempo. Revisa tu conexión a internet y vuelve a intentarlo.`
},
stream_drop: {
title: 'La respuesta se cortó',
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index f3bf23576f1..6de8b8b41cf 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -5478,8 +5478,9 @@ export const frOverrides = {
`${provider} a renvoyé une erreur serveur. Réessayez dans un instant ou changez de fournisseur.`
},
timeout: {
- title: 'Délai de réponse dépassé',
- body: provider => `${provider} n'a pas répondu à temps. Réessayez pour renvoyer le message.`
+ title: 'Service d’IA injoignable',
+ body: provider =>
+ `${provider} est injoignable ou n'a pas répondu à temps. Vérifiez votre connexion internet, puis réessayez.`
},
stream_drop: {
title: 'La réponse a été interrompue',
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index f61886162e7..e4d49797e13 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -3792,8 +3792,9 @@ export const ja = defineLocale({
`${provider} がサーバーエラーを返しました。しばらくしてから再試行するか、プロバイダーを切り替えてください。`
},
timeout: {
- title: '応答がタイムアウトしました',
- body: provider => `${provider} から時間内に応答がありませんでした。再試行してもう一度送信してください。`
+ title: 'AI サービスに接続できません',
+ body: provider =>
+ `${provider} に接続できないか、時間内に応答がありませんでした。インターネット接続を確認してから再試行してください。`
},
ssl_cert_verification: {
title: '安全な接続に失敗しました',
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index 6055b6c6094..c2d580fe5ec 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -3963,8 +3963,8 @@ export const zhHant = defineLocale({
body: provider => `${provider} 傳回了伺服器錯誤。請稍後重試或切換服務商。`
},
timeout: {
- title: '回覆逾時',
- body: provider => `${provider} 未及時回應。請重試以重新傳送。`
+ title: '無法連線到 AI 服務',
+ body: provider => `無法連線到 ${provider},或其未及時回應。請檢查網路連線後重試。`
},
ssl_cert_verification: {
title: '安全連線失敗',
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 7b309d09ad7..91f755cb12b 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -4749,8 +4749,8 @@ export const zh = defineLocale({
body: provider => `${provider} 返回了服务器错误。请稍后重试或切换服务商。`
},
timeout: {
- title: '回复超时',
- body: provider => `${provider} 未及时响应。请重试以重新发送。`
+ title: '无法连接到 AI 服务',
+ body: provider => `无法连接到 ${provider},或其未及时响应。请检查网络连接后重试。`
},
ssl_cert_verification: {
title: '安全连接失败',
diff --git a/apps/desktop/src/lib/error-surface-copy.test.ts b/apps/desktop/src/lib/error-surface-copy.test.ts
index d9e7d6912b6..dc2b4eb0e64 100644
--- a/apps/desktop/src/lib/error-surface-copy.test.ts
+++ b/apps/desktop/src/lib/error-surface-copy.test.ts
@@ -52,3 +52,19 @@ it.each(['zh', 'zh-hant', 'ja'] as const)(
}
}
)
+
+it('does not blame a slow reply when the provider could not be reached', () => {
+ // The backend stamps `timeout` for refused connections and DNS failures too
+ // (agent/error_classifier.py _CONNECTION_MESSAGE_PATTERNS).
+ const surface = parseErrorSurface({
+ layer: 'provider',
+ code: 'timeout',
+ provider_label: 'OpenCode Go',
+ retryable: true
+ })
+
+ const copy = errorCardText(TRANSLATIONS.en.assistant.thread, surface)
+
+ expect(copy.title).toBe('Could not reach the AI service')
+ expect(copy.body).toContain('OpenCode Go could not be reached')
+})