fetchDialModels function
Fetches the deployment ids from {baseUrl}/openai/models (OpenAI-shaped
{"data": [{"id": …}]} response), authenticating with the Api-Key
header. Any failure answers an empty list — callers keep their hardcoded
fallback model list.
Implementation
Future<List<String>> fetchDialModels(
String baseUrl,
String apiKey, {
http.Client? client,
}) async {
final (ids, _, _, _) = await fetchDialModelsInfo(
baseUrl,
apiKey,
client: client,
);
return ids;
}