Adds dynamic Claude model fetching and management #1

Merged
AlexKucera merged 60 commits from dynamic-models into master 2025-10-31 13:42:04 +01:00
Showing only changes of commit 03d2b1c93d - Show all commits
+7 -1
View File
1
@@ -79,7 +79,13 @@ export class AnthropicClient {
throw new Error(`Models API request failed: ${response.status}\n${response.text}`); throw new Error(`Models API request failed: ${response.status}\n${response.text}`);
} }
return response.json as ModelsListResponse; // Validate basic response structure
const data = response.json as any;
if (!data || !Array.isArray(data.data)) {
throw new Error('Invalid models API response structure');
}
return data as ModelsListResponse;
} catch (error) { } catch (error) {
if (error instanceof Error) { if (error instanceof Error) {
throw error; throw error;
3