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

Method fetchModel

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

Source from the content-addressed store, hash-verified

534 }
535
536 public async fetchModel() {
537 const [models, endpoints] = await Promise.all([
538 getModels({ provider: "openrouter" }),
539 getModelEndpoints({
540 router: "openrouter",
541 modelId: this.options.openRouterModelId,
542 endpoint: this.options.openRouterSpecificProvider,
543 }),
544 ])
545
546 this.models = models
547 this.endpoints = endpoints
548
549 return this.getModel()
550 }
551
552 override getModel() {
553 const id = this.options.openRouterModelId ?? openRouterDefaultModelId

Callers 2

createMessageMethod · 0.95
completePromptMethod · 0.95

Calls 4

getModelMethod · 0.95
getModelsFunction · 0.90
getModelEndpointsFunction · 0.90
allMethod · 0.80

Tested by

no test coverage detected