(input: RequestInput)
| 179 | } |
| 180 | |
| 181 | export const request = (input: RequestInput) => { |
| 182 | const converted = messages(input.messages) |
| 183 | // This is the only native adapter boundary that should construct canonical |
| 184 | // @opencode-ai/llm request objects from opencode's session/AI SDK-shaped data. |
| 185 | return LLM.request({ |
| 186 | model: model(input, input.headers), |
| 187 | system: [...(input.system ?? []).map(SystemPart.make), ...converted.system], |
| 188 | messages: converted.messages, |
| 189 | tools: tools(input.tools), |
| 190 | toolChoice: input.toolChoice, |
| 191 | generation: generation(input), |
| 192 | providerOptions: input.providerOptions, |
| 193 | }) |
| 194 | } |
| 195 | |
| 196 | export * as LLMNative from "./native-request" |
nothing calls this directly
no test coverage detected