ModelsClient
TheModelsClient struct provides methods to discover available models and check their operational status.
Constructor
new()
Create a new ModelsClient instance.Cookie header string for authenticating requests to t3.chat
Session ID for Convex authentication
Self - A new ModelsClient instance
Methods
get_model_statuses()
Fetch the operational status of all available models. This method dynamically discovers models from the t3.chat website and returns their current status.Result<Vec<ModelStatus>, Box<dyn std::error::Error>>
A vector of ModelStatus objects containing information about each model
An error if the request fails or model discovery encounters issues
Data Structures
ModelStatus
Represents the operational status of a model.The model ID (e.g., “claude-3.7”, “gpt-4o”)
The operational status indicator (typically “operational”)
A short description of the model’s capabilities
ModelInfo
Detailed information about a model, including provider details and capabilities.The unique model identifier
The display name of the model
The service provider (e.g., “Anthropic”, “OpenAI”)
The company or organization that developed the model
A brief description of the model
A detailed description of the model’s capabilities (may be empty)
Whether the model requires a pro subscription
Whether the model is a premium offering
Example Usage
Discover Available Models
Check Specific Model
Notes
- The
get_model_statuses()method dynamically discovers models from t3.chat’s website - If dynamic discovery fails, it falls back to a hardcoded list of known models
- Model availability may change over time as t3.chat adds or removes models
- Use this client to check which models are currently available before sending chat requests