Skip to content

Validate API configuration before making calls #84

Description

@sfloess

Part of #21: MEDIUM: No input validation before API calls

Scope

Validate that the API client is properly configured (API key set, endpoint URL valid, model selected) before attempting any API call.

What to do

  • Add a validateConfiguration() method or pre-call check to each AI client
  • Check for: missing/empty API key, missing/malformed endpoint URL, unset model name
  • Throw a descriptive exception or show a user-facing notification if configuration is incomplete
  • Consider a isConfigured() method for UI to disable "Send" button when not ready

Acceptance criteria

  • Attempting an API call without a configured API key gives a clear error (not an HTTP 401 after the fact)
  • Missing endpoint or model selection is caught before the HTTP call
  • Users see actionable error messages directing them to the settings panel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions