MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / fetchDeepSeekModels

Function fetchDeepSeekModels

out/cli.cjs:86331–86347  ·  view source on GitHub ↗
(apiKey)

Source from the content-addressed store, hash-verified

86329 const models = data.data?.filter(
86330 (m5) => m5.context_length && m5.context_length > 0
86331 ).map((m5) => m5.id).sort();
86332 return models && models.length > 0 ? models : MODEL_LIST.openrouter;
86333 } catch {
86334 return MODEL_LIST.openrouter;
86335 }
86336}
86337async function fetchDeepSeekModels(apiKey) {
86338 try {
86339 const response = await fetch("https://api.deepseek.com/v1/models", {
86340 headers: {
86341 Authorization: `Bearer ${apiKey}`
86342 }
86343 });
86344 if (!response.ok) {
86345 return MODEL_LIST.deepseek;
86346 }
86347 const data = await response.json();
86348 const models = data.data?.map((m5) => m5.id).sort();
86349 return models && models.length > 0 ? models : MODEL_LIST.deepseek;
86350 } catch {

Callers 1

fetchModelsForProviderFunction · 0.70

Calls 2

jsonMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…