Troubleshooting Guide
This guide explains common errors you may encounter when using the gllm-inference library and how to resolve them.
Error Reference
ProviderInvalidArgsError
What it means: You've provided invalid model parameters, malformed requests, or incorrect structure to the model provider.
Common causes:
Invalid parameter types or values
Malformed request structure
Missing required parameters
Incorrect schema format for structured outputs
How to fix:
Check the API reference for your specific invoker to verify parameter names and types
Validate your request structure matches the expected format
Ensure all required parameters are provided
For structured outputs, verify your Pydantic model or JSON schema is valid
ContextOverflowError
What it means: Your input size exceeds the model's maximum context length limit.
Common causes:
Input text is too long for the model
Including too many messages in conversation history
Large attachments (documents, images) that consume tokens
Insufficient token budget for both input and output
How to fix:
Reduce the input size by summarizing or truncating content
Limit conversation history to recent messages only
Break large documents into smaller chunks
Check the model's context window size in the supported models documentation
Consider using a model with a larger context window
ProviderAuthError
What it means: Authorization failed due to API key issues. Your credentials are invalid, missing, or don't have the required permissions.
Common causes:
Invalid or expired API key
API key not set in environment variables
API key belongs to wrong organization or account
Insufficient permissions for the requested operation
Typo in API key
How to fix:
Verify your API key is correct and not expired
Check that the API key is set in the correct environment variable:
OpenAI:
OPENAI_API_KEYAnthropic:
ANTHROPIC_API_KEYGoogle:
GOOGLE_API_KEYAzure OpenAI:
AZURE_OPENAI_API_KEY
Ensure the API key has the required permissions
For organization-specific keys, verify the organization is correct
Regenerate the API key if you suspect it's compromised
ProviderRateLimitError
What it means: You've exceeded the rate limit for API requests. The model provider is throttling your requests due to too many calls in a short time.
Common causes:
Too many requests sent in a short time window
Batch processing without proper delays
Concurrent requests exceeding provider limits
Free tier account with lower rate limits
How to fix:
Implement exponential backoff
Add delays between requests
Use batch invocation for bulk processing (cheaper and respects rate limits)
Upgrade to a higher tier account if on free tier
Distribute requests over a longer time period
ProviderInternalError
What it means: An unexpected server-side error occurred at the model provider. This is not caused by your code.
Common causes:
Temporary service outage at the provider
Server-side bug or issue
Provider maintenance or deployment
Overloaded provider infrastructure
How to fix:
Wait a few moments and retry (the SDK automatically retries with
RetryConfig)Check the provider's status page for known issues
If the error persists, contact the provider's support
Increase retry attempts and timeout values
ProviderOverloadedError
What it means: The model provider's engine is currently overloaded and cannot process your request.
Common causes:
Provider experiencing high traffic
Too many concurrent requests
Provider maintenance or scaling issues
Sudden spike in usage
How to fix:
Wait and retry later (automatic with
RetryConfig)Reduce concurrent request volume
Use batch invocation to spread requests over time
Check provider status page for ongoing issues
Consider using an alternative model or provider temporarily
ModelNotFoundError
What it means: The specified model could not be found. The model ID is invalid or the model is not available.
Common causes:
Typo in model ID
Model has been deprecated or removed
Model is not available in your region or account
Model name changed in a new version
How to fix:
Check the supported models documentation for correct model IDs
Verify the model is available for your account
Check for model deprecation notices
Use the correct model enum from the library (e.g.,
OpenAILM.GPT_5_NANO)
APIConnectionError
What it means: The client failed to connect to the model provider. This is typically a network issue.
Common causes:
Network connectivity problems
Provider service is down or unreachable
Firewall or proxy blocking the connection
DNS resolution issues
Provider endpoint is incorrect
How to fix:
Check your internet connection
Verify the provider's service status
Check firewall/proxy settings
Try using a VPN if the provider is geographically blocked
Verify the correct endpoint URL is being used
Retry with
RetryConfigto handle transient network issues
APITimeoutError
What it means: The request to the model provider timed out. The provider took too long to respond.
Common causes:
Provider is slow to respond
Network latency is high
Request is complex and takes long to process
Timeout value is too short
Provider is overloaded
How to fix:
Increase the timeout value in
RetryConfigRetry the request (automatic with
RetryConfig)Check if the request is too complex
Verify network connectivity
Check provider status for performance issues
ProviderConflictError
What it means: The request could not be completed due to a conflict with the current state of the resource.
Common causes:
Resource already exists
Resource state changed during operation
Concurrent modification of the same resource
Invalid state transition
How to fix:
Check the current state of the resource
Verify the operation is valid for the current state
Retry the operation
Ensure only one process modifies the resource at a time
InvokerRuntimeError
What it means: An error occurred during the invocation of the model. This is a general runtime error.
Common causes:
Unexpected error in the invoker code
Invalid state during invocation
Resource exhaustion
Incompatible configuration
How to fix:
Check the debug info in the error message for details
Verify your configuration is valid
Check available system resources
Review the error's
debug_infoattribute for more contextEnable verbose logging for more details
FileOperationError
What it means: A file operation failed during model invocation.
Common causes:
File not found or inaccessible
Insufficient permissions to read/write file
Disk space issues
File is corrupted
Invalid file path
How to fix:
Verify the file path is correct and the file exists
Check file permissions
Ensure sufficient disk space
Verify the file is not corrupted
Check that the file format is supported
Getting Help
If you encounter an error:
Check the error message and debug info - The error message usually contains useful details
Enable verbose logging - Use the error's
verbose()method to get detailed informationReview the API Reference - Check the API documentation
Check the provider's documentation - Some errors are provider-specific
Contact support - Reach out to the development team if you need further assistance
Last updated
Was this helpful?