(extra: Tool.Context["extra"])
| 43 | } |
| 44 | |
| 45 | export function webSearchModelName(extra: Tool.Context["extra"]) { |
| 46 | const model = extra?.model |
| 47 | if (!model || typeof model !== "object") return undefined |
| 48 | const api = "api" in model && model.api && typeof model.api === "object" ? model.api : undefined |
| 49 | const apiID = api && "id" in api && typeof api.id === "string" ? api.id : undefined |
| 50 | const id = "id" in model && typeof model.id === "string" ? model.id : undefined |
| 51 | return (apiID ?? id)?.slice(0, 100) |
| 52 | } |
| 53 | |
| 54 | function parallelAuthHeaders() { |
| 55 | const headers = { "User-Agent": `opencode/${InstallationVersion}` } |
no outgoing calls
no test coverage detected