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

Method getModel

src/api/providers/requesty.ts:81–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 }
80
81 override getModel() {
82 const id = this.options.requestyModelId ?? requestyDefaultModelId
83 const cachedInfo = this.models[id] ?? requestyDefaultModelInfo
84 let info: ModelInfo = cachedInfo
85
86 // Apply tool preferences for models accessed through routers (OpenAI, Gemini)
87 info = applyRouterToolPreferences(id, info)
88
89 const params = getModelParams({
90 format: "anthropic",
91 modelId: id,
92 model: info,
93 settings: this.options,
94 defaultTemperature: 0,
95 })
96 const reasoning = getAnthropicProviderReasoning({
97 model: info,
98 reasoningBudget: params.reasoningBudget,
99 settings: this.options,
100 })
101
102 return { id, info, ...params, reasoning }
103 }
104
105 protected processUsageMetrics(usage: any, modelInfo?: ModelInfo): ApiStreamUsageChunk {
106 const requestyUsage = usage as RequestyUsage

Callers 1

fetchModelMethod · 0.95

Calls 3

getModelParamsFunction · 0.90

Tested by

no test coverage detected