Skip to content

Tetrate provider: 'Failed to check account balance' error during model fetching #6993

@blackgirlbytes

Description

@blackgirlbytes

Problem

Users report seeing a 'failed to check account balance' error when trying to use the Tetrate provider.

Root Cause Analysis

This error message originates from the Tetrate API (not goose code). After searching the entire goose codebase, there are no references to 'account balance' - the error is being passed through from Tetrate's API response.

The error occurs when goose calls the Tetrate /v1/models endpoint to fetch available models. Possible causes:

  1. Invalid/expired API key - The TETRATE_API_KEY stored in goose config may be invalid
  2. Account issues - User's Tetrate account may have insufficient credits or be suspended
  3. API key permissions - The API key may not have permission to list models

Investigation Needed

  1. Verify what the Tetrate API returns when the API key is invalid
  2. Check if there's a specific endpoint for validating API keys before fetching models
  3. Consider adding better error handling/messaging for authentication failures

Affected Code

  • crates/goose/src/providers/tetrate.rs - fetch_supported_models() method
  • Error handling at lines 272-281 passes through API errors

Suggested Improvements

  1. Add specific error handling for authentication/balance errors from Tetrate API
  2. Provide clearer user-facing error messages (e.g., 'Your Tetrate API key may be invalid or your account may need attention. Please check your account at router.tetrate.ai')
  3. Consider validating the API key during provider configuration

User Impact

Users see a confusing error message and cannot use the Tetrate provider. https://discord.com/channels/1287729918100246654/1465824371019878634

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions