Fix Loop authentication error with model providers

Last updated: March 11, 2026

Summary

This error occurs when Loop tries to use a model without a valid API key:

Failed to authenticate with the model provider. Please check that your API key is valid in the model provider settings page and try again

This happens when users select models that aren't properly configured or when API keys have expired or been deleted.

Applicable To

Plans: Any

Deployments: Any

Use case: Loop with misconfigured or missing model API keys

Resolution Steps

Step 1: Check the selected model

In Loop, verify which model is currently selected in the model dropdown. Note the exact model name (e.g., GPT-4, Claude-3, etc.).

Step 2: Verify API key configuration

Go to Settings → Organization → AI providers (or Settings → Project → AI providers for project-level keys) and confirm:

  • The selected model's provider has an API key configured

  • The API key is valid and hasn't expired

  • The key has access to the specific model variant

Step 3: Test the API key

Verify the API key works by testing it:

  • Try the same model in a Braintrust playground

  • Test the API key directly with the provider (e.g., OpenAI API, Anthropic API) outside of Braintrust

  • Ensure the key has access to the specific model variant you're trying to use

Step 4: Switch to a configured model

If the current model lacks a valid API key, select a different model in Loop that has proper authentication configured.

Step 5: Test the connection

Try using Loop again with the newly selected model to confirm the authentication error is resolved.

Prevention

Note: To prevent users from encountering this error, configure the Loop model allowlist at Settings → Organization → Loop. Remove any models that don't have configured API keys from the allowlist so they won't appear in the model selector.

Internal Links