feat(ai): type OpenAI request options (#39495)
This commit is contained in:
parent
333a090975
commit
8a96b80aec
2 changed files with 26 additions and 6 deletions
13
packages/ai/test/provider-options/openai.types.ts
Normal file
13
packages/ai/test/provider-options/openai.types.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { LLM } from "../../src"
|
||||
import { OpenAI } from "../../src/providers"
|
||||
|
||||
const model = OpenAI.responses("gpt-5")
|
||||
|
||||
LLM.request({ model, prompt: "Hello", providerOptions: { openai: { reasoningEffort: "high" } } })
|
||||
|
||||
LLM.request({
|
||||
model,
|
||||
prompt: "Hello",
|
||||
// @ts-expect-error OpenAI reasoning effort must be a string.
|
||||
providerOptions: { openai: { reasoningEffort: 1 } },
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue