MCPcopy Create free account
hub / github.com/arctic-cli/interface / options

Function options

packages/arctic/src/provider/transform.ts:229–292  ·  view source on GitHub ↗
(
    model: Provider.Model,
    sessionID: string,
    providerOptions?: Record<string, any>,
    thinkingLevel?: "low" | "medium" | "high" | "xhigh",
  )

Source from the content-addressed store, hash-verified

227 }
228
229 export function options(
230 model: Provider.Model,
231 sessionID: string,
232 providerOptions?: Record<string, any>,
233 thinkingLevel?: "low" | "medium" | "high" | "xhigh",
234 ): Record<string, any> {
235 const result: Record<string, any> = {}
236 const supportsThinking =
237 model.api.id.includes("thinking") || model.api.id.includes("gemini-3") || model.api.id.includes("opus")
238
239 if (model.api.npm === "@openrouter/ai-sdk-provider") {
240 result["usage"] = {
241 include: true,
242 }
243 if (model.api.id.includes("gemini-3")) {
244 result["reasoning"] = { effort: thinkingLevel ?? "high" }
245 }
246 }
247
248 if (
249 model.providerID === "baseten" ||
250 (model.providerID === "arctic" && ["kimi-k2-thinking", "glm-4.6"].includes(model.api.id))
251 ) {
252 result["chat_template_args"] = { enable_thinking: true }
253 }
254
255 if (model.providerID === "openai" || providerOptions?.setCacheKey) {
256 result["promptCacheKey"] = sessionID
257 }
258
259 if ((model.api.npm === "@ai-sdk/google" || model.api.npm === "@ai-sdk/google-vertex") && supportsThinking) {
260 result["thinkingConfig"] = {
261 includeThoughts: true,
262 }
263 if (model.api.id.includes("gemini-3")) {
264 result["thinkingConfig"]["thinkingLevel"] = thinkingLevel ?? "high"
265 }
266 }
267
268 if (model.api.id.includes("gpt-5") && !model.api.id.includes("gpt-5-chat")) {
269 if (model.providerID.includes("codex")) {
270 result["store"] = false
271 // gpt-5.2-codex and gpt-5.3-codex support xhigh reasoning
272 if (model.api.id.includes("gpt-5.2-codex") || model.api.id.includes("gpt-5.3-codex")) {
273 result["reasoningEffort"] = thinkingLevel ?? "medium"
274 }
275 }
276
277 if (!model.api.id.includes("codex") && !model.api.id.includes("gpt-5-pro")) {
278 result["reasoningEffort"] = thinkingLevel ?? "medium"
279 }
280
281 if (model.api.id.endsWith("gpt-5.") && model.providerID !== "azure") {
282 result["textVerbosity"] = "low"
283 }
284
285 if (model.providerID.startsWith("arctic")) {
286 result["promptCacheKey"] = sessionID

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected