MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / loadDynamicModels

Method loadDynamicModels

src/api/providers/openrouter.ts:164–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162 }
163
164 private async loadDynamicModels(): Promise<void> {
165 try {
166 const [models, endpoints] = await Promise.all([
167 getModels({ provider: "openrouter" }),
168 getModelEndpoints({
169 router: "openrouter",
170 modelId: this.options.openRouterModelId,
171 endpoint: this.options.openRouterSpecificProvider,
172 }),
173 ])
174
175 this.models = models
176 this.endpoints = endpoints
177 } catch (error) {
178 console.error("[OpenRouterHandler] Error loading dynamic models:", {
179 error: error instanceof Error ? error.message : String(error),
180 stack: error instanceof Error ? error.stack : undefined,
181 })
182 }
183 }
184
185 getReasoningDetails(): any[] | undefined {
186 return this.currentReasoningDetails.length > 0 ? this.currentReasoningDetails : undefined

Callers 1

constructorMethod · 0.95

Calls 5

getModelsFunction · 0.90
getModelEndpointsFunction · 0.90
allMethod · 0.80
errorMethod · 0.65
StringInterface · 0.50

Tested by

no test coverage detected