Skip to main content

fetch_models_blocking

Function fetch_models_blocking 

Source
pub fn fetch_models_blocking(
    base_url: &str,
    api_key: &str,
) -> Result<Vec<String>, String>
Expand description

Model fetching utilities (async and blocking). Fetch the model list from an OpenAI-compatible /v1/models endpoint using the shared reqwest::blocking client.

base_url should be something like "https://api.minimax.chat/v1". The function appends /models and issues a GET with a Bearer token.

§Errors

Returns a human-readable error string on failure (network, auth, parse).