MCPcopy Create free account
hub / github.com/Roy3838/Observer / fetchModels

Function fetchModels

app/src/components/AvailableModels.tsx:144–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 };
143
144 const fetchModels = async () => {
145 setLoading(true);
146 try {
147 const response = await fetchAllModels();
148 if (response.error) throw new Error(response.error);
149 setModels(response.models);
150 Logger.info('MODELS', `Loaded ${response.models.length} models`);
151 } catch (err) {
152 Logger.error('MODELS', `Failed to fetch models: ${err instanceof Error ? err.message : String(err)}`);
153 } finally {
154 setLoading(false);
155 setRefreshing(false);
156 }
157 };
158
159 const detectOllamaServers = async () => {
160 const { getInferenceAddresses } = await import('@utils/inferenceServer');

Callers

nothing calls this directly

Calls 2

infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected