Providers errors

Common error signatures

Errors in the providers module fall into two categories: missing optional SDK dependencies and invalid provider names passed to get_provider().

Exception Message pattern Likely cause
ValueError Unknown provider '{name}'. Known providers: {list}. You passed an unrecognized name to get_provider().
ImportError / ModuleNotFoundError (varies by SDK) You instantiated ClaudeProvider or GeminiProvider without installing the required extra.

Where errors originate

How to diagnose

  1. Check the provider name. If you see ValueError: Unknown provider '...'. Known providers: ..., the name you passed to get_provider() is misspelled or not registered. Call list_available() to see which providers are importable in the current environment.

  2. Verify the installed extras. If you get an ImportError when constructing ClaudeProvider or GeminiProvider, install the corresponding extra:

    • ClaudeProviderpip install attune-rag[claude]
    • GeminiProviderpip install attune-rag[gemini]
  3. Confirm list_available() output matches your expectations. If a provider you expect is absent from the returned list, its SDK is not importable — install the relevant extra and re-check.

  4. Check API key availability. Both ClaudeProvider and GeminiProvider accept an api_key argument. If you rely on environment-variable injection instead, confirm the variable is set before the provider is constructed.

Source files

Tags: providers, llm, claude, gemini