Function
requireBaseURL
(model: Provider.Model, url: string | undefined)
Source from the content-addressed store, hash-verified
| 146 | "model" in input ? (input.baseURL ?? (input.model.api.url || undefined)) : input.api.url || undefined |
| 147 | |
| 148 | const requireBaseURL = (model: Provider.Model, url: string | undefined) => { |
| 149 | if (url) return url |
| 150 | throw new Error(`Native LLM request adapter requires a base URL for ${model.providerID}/${model.id}`) |
| 151 | } |
| 152 | |
| 153 | export const model = (input: Provider.Model | RequestInput, headers?: Record<string, string>) => { |
| 154 | const model = "model" in input ? input.model : input |
Tested by
no test coverage detected