Skip to content

Improvement: "No API key configured" toast should link to the provider settings #2375

Closed

Description

@yannickmonney

Problem

When sending is blocked because the active model's provider has no API key, the destructive toast states the problem but offers no way to fix it — the user has to know that Settings → AI providers is the place to go.

Current behavior

  • services/platform/app/features/chat/components/chat-input.tsx:507 — toast({ title: sendBlockedReason, variant: 'destructive' }), title only.
  • The reason comes from chat-interface.tsx:1405-1413 (t('modelSelector.noApiKey'), driven by activeModelMissingApiKey at lines 366-368).
  • The missing_api_key error classification (services/platform/lib/shared/chat-errors.ts:125-133) rendered by chat-error-display.tsx has no settings link either.
  • The toast system supports actions (see Improvement: Give all toasts a concise title + description #1944 for toast anatomy).

Proposed change

Add an action ("Open provider settings") to the toast and to the missing_api_key chat-error display, deep-linking to /dashboard/$id/settings/providers (ideally with the affected provider's drawer opened). Only show the action to members who can manage providers; otherwise phrase it as "ask an admin".

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions