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

Method getModel

src/api/providers/unbound.ts:75–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 override getModel() {
76 const id = this.options.unboundModelId ?? unboundDefaultModelId
77 const cachedInfo = this.models[id] ?? unboundDefaultModelInfo
78 let info: ModelInfo = cachedInfo
79
80 // Apply tool preferences for models accessed through routers (OpenAI, Gemini)
81 info = applyRouterToolPreferences(id, info)
82
83 const params = getModelParams({
84 format: "openai",
85 modelId: id,
86 model: info,
87 settings: this.options,
88 defaultTemperature: 0,
89 })
90
91 return { id, info, ...params }
92 }
93
94 protected processUsageMetrics(usage: any, modelInfo?: ModelInfo): ApiStreamUsageChunk {
95 const unboundUsage = usage as UnboundUsage

Callers 1

fetchModelMethod · 0.95

Calls 2

getModelParamsFunction · 0.90

Tested by

no test coverage detected