Reference/SDK

braintrust

An isomorphic JS library for working with Braintrust. This library contains functionality for running evaluations, logging completions, loading and invoking functions, and more.

braintrust is distributed as a library on NPM. It is also open source and available on GitHub.

Quickstart

Install the library with npm (or yarn).

npm install braintrust

Then, create a file like hello.eval.ts with the following content:

import { Eval } from "braintrust";
 
function isEqual({ output, expected }: { output: string; expected?: string }) {
  return { name: "is_equal", score: output === expected ? 1 : 0 };
}
 
Eval("Say Hi Bot", {
  data: () => {
    return [
      {
        input: "Foo",
        expected: "Hi Foo",
      },
      {
        input: "Bar",
        expected: "Hello Bar",
      },
    ]; // Replace with your eval dataset
  },
  task: (input: string) => {
    return "Hi " + input; // Replace with your LLM call
  },
  scores: [isEqual],
});

Finally, run the script with npx braintrust eval hello.eval.ts.

BRAINTRUST_API_KEY=<YOUR_BRAINTRUST_API_KEY> npx braintrust eval hello.eval.ts

Classes

Interfaces

Namespaces

Functions

BaseExperiment

BaseExperiment<Input, Expected, Metadata>(options?): BaseExperiment<Input, Expected, Metadata>

Use this to specify that the dataset should actually be the data from a previous (base) experiment. If you do not specify a name, Braintrust will automatically figure out the best base experiment to use based on your git history (or fall back to timestamps).

Type parameters

NameType
Inputunknown
Expectedunknown
Metadataextends BaseMetadata = void

Parameters

NameTypeDescription
optionsObject
options.name?stringThe name of the base experiment to use. If unspecified, Braintrust will automatically figure out the best base using your git history (or fall back to timestamps).

Returns

BaseExperiment<Input, Expected, Metadata>


Eval

Eval<Input, Output, Expected, Metadata, EvalReport, Parameters>(name, evaluator, reporterOrOpts?): Promise<EvalResultWithSummary<Input, Output, Expected, Metadata>>

Type parameters

NameType
InputInput
OutputOutput
Expectedvoid
Metadataextends BaseMetadata = void
EvalReportboolean
Parametersextends Record<string, { default?: { model: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; tools?: { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[] } ; description?: string ; type: "prompt" } | ZodType<unknown, ZodTypeDef, unknown>> = Record<string, { default?: { model: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; tools?: { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[] } ; description?: string ; type: "prompt" } | ZodType<unknown, ZodTypeDef, unknown>>

Parameters

NameType
namestring
evaluatorEvaluator<Input, Output, Expected, Metadata, Parameters>
reporterOrOpts?string | ReporterDef<EvalReport> | EvalOptions<EvalReport, Parameters>

Returns

Promise<EvalResultWithSummary<Input, Output, Expected, Metadata>>


Reporter

Reporter<EvalReport>(name, reporter): ReporterDef<EvalReport>

Type parameters

Name
EvalReport

Parameters

NameType
namestring
reporterReporterBody<EvalReport>

Returns

ReporterDef<EvalReport>


buildLocalSummary

buildLocalSummary(evaluator, results): ExperimentSummary

Parameters

NameType
evaluatorEvaluatorDef<any, any, any, any, Record<string, { default?: { model: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; tools?: { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[] } ; description?: string ; type: "prompt" } | ZodType<unknown, ZodTypeDef, unknown>>>
resultsEvalResult<any, any, any, any>[]

Returns

ExperimentSummary


createFinalValuePassThroughStream

createFinalValuePassThroughStream<T>(onFinal, onError): TransformStream<T, BraintrustStreamChunk>

Create a stream that passes through the final value of the stream. This is used to implement BraintrustStream.finalValue().

Type parameters

NameType
Textends string | { data: string ; type: "text_delta" } | { data: string ; type: "reasoning_delta" } | { data: string ; type: "json_delta" } | { data: string ; type: "error" } | { data: { message: string ; stream: "stderr" | "stdout" } = sseConsoleEventDataSchema; type: "console" } | { data: { data: string ; event: "start" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "console" | "progress" | "done" ; format: "code" | "global" | "graph" | "llm" ; id: string ; name: string ; object_type: "prompt" | "tool" | "scorer" | "task" | "agent" ; origin?: null | { _xact_id?: null | string ; created?: null | string ; id: string ; object_id: string ; object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs" } ; output_type: "completion" | "score" | "any" } = sseProgressEventDataSchema; type: "progress" } | { data: string ; type: "start" } | { data: string ; type: "done" } | Uint8Array

Parameters

NameTypeDescription
onFinal(result: unknown) => voidA function to call with the final value of the stream.
onError(error: unknown) => void-

Returns

TransformStream<T, BraintrustStreamChunk>

A new stream that passes through the final value of the stream.


currentExperiment

currentExperiment(options?): Experiment | undefined

Returns the currently-active experiment (set by init). Returns undefined if no current experiment has been set.

Parameters

NameType
options?OptionalStateArg

Returns

Experiment | undefined


currentLogger

currentLogger<IsAsyncFlush>(options?): Logger<IsAsyncFlush> | undefined

Returns the currently-active logger (set by initLogger). Returns undefined if no current logger has been set.

Type parameters

NameType
IsAsyncFlushextends boolean

Parameters

NameType
options?AsyncFlushArg<IsAsyncFlush> & OptionalStateArg

Returns

Logger<IsAsyncFlush> | undefined


currentSpan

currentSpan(options?): Span

Return the currently-active span for logging (set by one of the traced methods). If there is no active span, returns a no-op span object, which supports the same interface as spans but does no logging.

See Span for full details.

Parameters

NameType
options?OptionalStateArg

Returns

Span


defaultErrorScoreHandler

defaultErrorScoreHandler(args): undefined | void | Record<string, number>

Parameters

NameType
argsObject
args.dataEvalCase<any, any, any>
args.rootSpanSpan
args.unhandledScoresstring[]

Returns

undefined | void | Record<string, number>


deserializePlainStringAsJSON

deserializePlainStringAsJSON(s): { error: undefined = undefined; value: any } | { error: unknown = e; value: string = s }

Parameters

NameType
sstring

Returns

{ error: undefined = undefined; value: any } | { error: unknown = e; value: string = s }


devNullWritableStream

devNullWritableStream(): WritableStream

Returns

WritableStream


flush

flush(options?): Promise<void>

Flush any pending rows to the server.

Parameters

NameType
options?OptionalStateArg

Returns

Promise<void>


getSpanParentObject

getSpanParentObject<IsAsyncFlush>(options?): Span | Experiment | Logger<IsAsyncFlush>

Mainly for internal use. Return the parent object for starting a span in a global context.

Type parameters

NameType
IsAsyncFlushextends boolean

Parameters

NameType
options?AsyncFlushArg<IsAsyncFlush> & OptionalStateArg

Returns

Span | Experiment | Logger<IsAsyncFlush>


init

init<IsOpen>(options): InitializedExperiment<IsOpen>

Log in, and then initialize a new experiment in a specified project. If the project does not exist, it will be created.

Type parameters

NameType
IsOpenextends boolean = false

Parameters

NameTypeDescription
optionsReadonly<FullInitOptions<IsOpen>>Options for configuring init().

Returns

InitializedExperiment<IsOpen>

The newly created Experiment.

init<IsOpen>(project, options?): InitializedExperiment<IsOpen>

Legacy form of init which accepts the project name as the first parameter, separately from the remaining options. See init(options) for full details.

Type parameters

NameType
IsOpenextends boolean = false

Parameters

NameType
projectstring
options?Readonly<InitOptions<IsOpen>>

Returns

InitializedExperiment<IsOpen>


initDataset

initDataset<IsLegacyDataset>(options): Dataset<IsLegacyDataset>

Create a new dataset in a specified project. If the project does not exist, it will be created.

Type parameters

NameType
IsLegacyDatasetextends boolean = false

Parameters

NameTypeDescription
optionsReadonly<FullInitDatasetOptions<IsLegacyDataset>>Options for configuring initDataset().

Returns

Dataset<IsLegacyDataset>

The newly created Dataset.

initDataset<IsLegacyDataset>(project, options?): Dataset<IsLegacyDataset>

Legacy form of initDataset which accepts the project name as the first parameter, separately from the remaining options.

See initDataset(options) for full details.

Type parameters

NameType
IsLegacyDatasetextends boolean = false

Parameters

NameType
projectstring
options?Readonly<InitDatasetOptions<IsLegacyDataset>>

Returns

Dataset<IsLegacyDataset>


initExperiment

initExperiment<IsOpen>(options): InitializedExperiment<IsOpen>

Alias for init(options).

Type parameters

NameType
IsOpenextends boolean = false

Parameters

NameType
optionsReadonly<InitOptions<IsOpen>>

Returns

InitializedExperiment<IsOpen>

initExperiment<IsOpen>(project, options?): InitializedExperiment<IsOpen>

Alias for init(project, options).

Type parameters

NameType
IsOpenextends boolean = false

Parameters

NameType
projectstring
options?Readonly<InitOptions<IsOpen>>

Returns

InitializedExperiment<IsOpen>


initFunction

initFunction(options): (input: any) => Promise<any>

Creates a function that can be used as a task or scorer in the Braintrust evaluation framework. The returned function wraps a Braintrust function and can be passed directly to Eval().

When used as a task:

const myFunction = initFunction({projectName: "myproject", slug: "myfunction"});
await Eval("test", {
  task: myFunction,
  data: testData,
  scores: [...]
});

When used as a scorer:

const myScorer = initFunction({ projectName: "myproject", slug: "myscorer" });
await Eval("test", {
  task: someTask,
  data: testData,
  scores: [myScorer],
});

Parameters

NameTypeDescription
optionsObjectOptions for the function.
options.projectNamestringThe project name containing the function.
options.slugstringThe slug of the function to invoke.
options.version?stringOptional version of the function to use. Defaults to latest.

Returns

fn

A function that can be used as a task or scorer in Eval().

▸ (input): Promise<any>

Parameters
NameType
inputany
Returns

Promise<any>


initLogger

initLogger<IsAsyncFlush>(options?): Logger<IsAsyncFlush>

Create a new logger in a specified project. If the project does not exist, it will be created.

Type parameters

NameType
IsAsyncFlushextends boolean = true

Parameters

NameTypeDescription
optionsReadonly<InitLoggerOptions<IsAsyncFlush>>Additional options for configuring init().

Returns

Logger<IsAsyncFlush>

The newly created Logger.


invoke

invoke<Input, Output, Stream>(args): Promise<InvokeReturn<Stream, Output>>

Invoke a Braintrust function, returning a BraintrustStream or the value as a plain Javascript object.

Type parameters

NameType
InputInput
OutputOutput
Streamextends boolean = false

Parameters

NameTypeDescription
argsInvokeFunctionArgs<Input, Output, Stream> & LoginOptions & { forceLogin?: boolean }The arguments for the function (see InvokeFunctionArgs for more details).

Returns

Promise<InvokeReturn<Stream, Output>>

The output of the function.


loadPrompt

loadPrompt(options): Promise<Prompt<true, true>>

Load a prompt from the specified project.

Parameters

NameTypeDescription
optionsLoadPromptOptionsOptions for configuring loadPrompt().

Returns

Promise<Prompt<true, true>>

The prompt object.

Throws

If the prompt is not found.

Throws

If multiple prompts are found with the same slug in the same project (this should never happen).

Example

const prompt = await loadPrompt({
  projectName: "My Project",
  slug: "my-prompt",
});

log

log(event): string

Log a single event to the current experiment. The event will be batched and uploaded behind the scenes.

Parameters

NameTypeDescription
eventExperimentLogFullArgsThe event to log. See Experiment.log for full details.

Returns

string

The id of the logged event.


logError

logError(span, error): void

Parameters

NameType
spanSpan
errorunknown

Returns

void


login

login(options?): Promise<BraintrustState>

Log into Braintrust. This will prompt you for your API token, which you can find at https://www.braintrust.dev/app/token. This method is called automatically by init().

Parameters

NameTypeDescription
optionsLoginOptions & { forceLogin?: boolean }Options for configuring login().

Returns

Promise<BraintrustState>


loginToState

loginToState(options?): Promise<BraintrustState>

Parameters

NameType
optionsLoginOptions

Returns

Promise<BraintrustState>


newId

newId(): string

Returns

string


parseCachedHeader

parseCachedHeader(value): number | undefined

Parameters

NameType
valueundefined | null | string

Returns

number | undefined


permalink(slug, opts?): Promise<string>

Format a permalink to the Braintrust application for viewing the span represented by the provided slug.

Links can be generated at any time, but they will only become viewable after the span and its root have been flushed to the server and ingested.

If you have a Span object, use Span.link instead.

Parameters

NameTypeDescription
slugstringThe identifier generated from Span.export.
opts?ObjectOptional arguments.
opts.appUrl?stringThe app URL to use. If not provided, the app URL will be inferred from the state.
opts.orgName?stringThe org name to use. If not provided, the org name will be inferred from the state.
opts.state?BraintrustStateThe login state to use. If not provided, the global state will be used.

Returns

Promise<string>

A permalink to the exported span.


promptDefinitionToPromptData

promptDefinitionToPromptData(promptDefinition, rawTools?): PromptData

Parameters

NameType
promptDefinitionObject
promptDefinition.modelstring
promptDefinition.params?objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">
rawTools?{ function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[]

Returns

PromptData


renderMessage

renderMessage<T>(render, message): T

Type parameters

NameType
Textends { content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string ; role: "model" }

Parameters

NameType
render(template: string) => string
messageT

Returns

T


renderPromptParams

renderPromptParams(params, args, options): ModelParams | undefined

Parameters

NameType
paramsundefined | objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">
argsRecord<string, unknown>
optionsObject
options.strict?boolean

Returns

ModelParams | undefined


reportFailures

reportFailures<Input, Output, Expected, Metadata>(evaluator, failingResults, «destructured»): void

Type parameters

NameType
InputInput
OutputOutput
ExpectedExpected
Metadataextends BaseMetadata

Parameters

NameType
evaluatorEvaluatorDef<Input, Output, Expected, Metadata, Record<string, { default?: { model: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; tools?: { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[] } ; description?: string ; type: "prompt" } | ZodType<unknown, ZodTypeDef, unknown>>>
failingResultsEvalResult<Input, Output, Expected, Metadata>[]
«destructured»ReporterOpts

Returns

void


runEvaluator

runEvaluator(experiment, evaluator, progressReporter, filters, stream, parameters?): Promise<EvalResultWithSummary<any, any, any, any>>

Parameters

NameType
experimentnull | Experiment
evaluatorEvaluatorDef<any, any, any, any, any>
progressReporterProgressReporter
filtersFilter[]
streamundefined | (data: { data: string ; event: "start" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "console" | "progress" | "done" ; format: "code" | "global" | "graph" | "llm" ; id: string ; name: string ; object_type: "prompt" | "tool" | "scorer" | "task" | "agent" ; origin?: null | { _xact_id?: null | string ; created?: null | string ; id: string ; object_id: string ; object_type: "function" | "prompt" | "experiment" | "dataset" | "prompt_session" | "project_logs" } ; output_type: "completion" | "score" | "any" }) => void
parameters?InferParameters<Record<string, { default?: { model: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; tools?: { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[] } ; description?: string ; type: "prompt" } | ZodType<unknown, ZodTypeDef, unknown>>>

Returns

Promise<EvalResultWithSummary<any, any, any, any>>


setFetch

setFetch(fetch): void

Set the fetch implementation to use for requests. You can specify it here, or when you call login.

Parameters

NameTypeDescription
fetch(input: URL | RequestInfo, init?: RequestInit) => Promise<Response>(input: string | URL | Request, init?: RequestInit) => Promise<Response>MDN Reference

Returns

void


spanComponentsToObjectId

spanComponentsToObjectId(«destructured»): Promise<string>

Parameters

NameType
«destructured»Object
› componentsSpanComponentsV3
› state?BraintrustState

Returns

Promise<string>


startSpan

startSpan<IsAsyncFlush>(args?): Span

Lower-level alternative to traced. This allows you to start a span yourself, and can be useful in situations where you cannot use callbacks. However, spans started with startSpan will not be marked as the "current span", so currentSpan() and traced() will be no-ops. If you want to mark a span as current, use traced instead.

See traced for full details.

Type parameters

NameType
IsAsyncFlushextends boolean = true

Parameters

NameType
args?StartSpanArgs & AsyncFlushArg<IsAsyncFlush> & OptionalStateArg

Returns

Span


summarize

summarize(options?): Promise<ExperimentSummary>

Summarize the current experiment, including the scores (compared to the closest reference experiment) and metadata.

Parameters

NameTypeDescription
optionsObjectOptions for summarizing the experiment.
options.comparisonExperimentId?stringThe experiment to compare against. If None, the most recent experiment on the origin's main branch will be used.
options.summarizeScores?booleanWhether to summarize the scores. If False, only the metadata will be returned.

Returns

Promise<ExperimentSummary>

A summary of the experiment, including the scores (compared to the closest reference experiment) and metadata.


traceable

traceable<F, IsAsyncFlush>(fn, args?): IsAsyncFlush extends false ? (...args: Parameters<F>) => Promise<Awaited<ReturnType<F>>> : F

A synonym for wrapTraced. If you're porting from systems that use traceable, you can use this to make your codebase more consistent.

Type parameters

NameType
Fextends (...args: any[]) => any
IsAsyncFlushextends boolean = true

Parameters

NameType
fnF
args?StartSpanArgs & SetCurrentArg & AsyncFlushArg<IsAsyncFlush>

Returns

IsAsyncFlush extends false ? (...args: Parameters<F>) => Promise<Awaited<ReturnType<F>>> : F


traced

traced<IsAsyncFlush, R>(callback, args?): PromiseUnless<IsAsyncFlush, R>

Toplevel function for starting a span. It checks the following (in precedence order):

  • Currently-active span
  • Currently-active experiment
  • Currently-active logger

and creates a span under the first one that is active. Alternatively, if parent is specified, it creates a span under the specified parent row. If none of these are active, it returns a no-op span object.

See Span.traced for full details.

Type parameters

NameType
IsAsyncFlushextends boolean = true
Rvoid

Parameters

NameType
callback(span: Span) => R
args?StartSpanArgs & SetCurrentArg & AsyncFlushArg<IsAsyncFlush> & OptionalStateArg

Returns

PromiseUnless<IsAsyncFlush, R>


updateSpan

updateSpan(«destructured»): void

Update a span using the output of span.export(). It is important that you only resume updating to a span once the original span has been fully written and flushed, since otherwise updates to the span may conflict with the original span.

Parameters

NameType
«destructured»{ exported: string } & Omit<Partial<ExperimentEvent>, "id"> & OptionalStateArg

Returns

void


withCurrent

withCurrent<R>(span, callback, state?): R

Runs the provided callback with the span as the current span.

Type parameters

Name
R

Parameters

NameTypeDefault value
spanSpanundefined
callback(span: Span) => Rundefined
stateundefined | BraintrustStateundefined

Returns

R


withDataset

withDataset<R, IsLegacyDataset>(project, callback, options?): R

Type parameters

NameType
RR
IsLegacyDatasetextends boolean = false

Parameters

NameType
projectstring
callback(dataset: Dataset<IsLegacyDataset>) => R
optionsReadonly<InitDatasetOptions<IsLegacyDataset>>

Returns

R

Deprecated

Use initDataset instead.


withExperiment

withExperiment<R>(project, callback, options?): R

Type parameters

Name
R

Parameters

NameType
projectstring
callback(experiment: Experiment) => R
optionsReadonly<LoginOptions & { forceLogin?: boolean } & { baseExperiment?: string ; baseExperimentId?: string ; dataset?: AnyDataset ; description?: string ; experiment?: string ; gitMetadataSettings?: { collect: "some" | "none" | "all" ; fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] } ; isPublic?: boolean ; metadata?: Record<string, unknown> ; projectId?: string ; repoInfo?: { author_email?: null | string ; author_name?: null | string ; branch?: null | string ; commit?: null | string ; commit_message?: null | string ; commit_time?: null | string ; dirty?: null | boolean ; git_diff?: null | string ; tag?: null | string } ; setCurrent?: boolean ; state?: BraintrustState ; update?: boolean } & InitOpenOption<false> & SetCurrentArg>

Returns

R

Deprecated

Use init instead.


withLogger

withLogger<IsAsyncFlush, R>(callback, options?): R

Type parameters

NameType
IsAsyncFlushextends boolean = false
Rvoid

Parameters

NameType
callback(logger: Logger<IsAsyncFlush>) => R
optionsReadonly<LoginOptions & { forceLogin?: boolean } & { orgProjectMetadata?: OrgProjectMetadata ; projectId?: string ; projectName?: string ; setCurrent?: boolean ; state?: BraintrustState } & AsyncFlushArg<IsAsyncFlush> & SetCurrentArg>

Returns

R

Deprecated

Use initLogger instead.


withParent

withParent<R>(parent, callback, state?): R

Type parameters

Name
R

Parameters

NameTypeDefault value
parentstringundefined
callback() => Rundefined
stateundefined | BraintrustStateundefined

Returns

R


wrapAISDKModel

wrapAISDKModel<T>(model): T

Wrap an ai-sdk model (created with .chat(), .completion(), etc.) to add tracing. If Braintrust is not configured, this is a no-op

Type parameters

NameType
Textends object

Parameters

NameType
modelT

Returns

T

The wrapped object.


wrapAnthropic

wrapAnthropic<T>(anthropic): T

Wrap an Anthropic object (created with new Anthropic(...)) to add tracing. If Braintrust is not configured, nothing will be traced. If this is not an Anthropic object, this function is a no-op.

Currently, this only supports the v4 API.

Type parameters

NameType
Textends object

Parameters

NameType
anthropicT

Returns

T

The wrapped Anthropic object.


wrapOpenAI

wrapOpenAI<T>(openai): T

Wrap an OpenAI object (created with new OpenAI(...)) to add tracing. If Braintrust is not configured, nothing will be traced. If this is not an OpenAI object, this function is a no-op.

Currently, this only supports the v4 API.

Type parameters

NameType
Textends object

Parameters

NameType
openaiT

Returns

T

The wrapped OpenAI object.


wrapOpenAIv4

wrapOpenAIv4<T>(openai): T

Type parameters

NameType
Textends OpenAILike

Parameters

NameType
openaiT

Returns

T


wrapTraced

wrapTraced<F, IsAsyncFlush>(fn, args?): IsAsyncFlush extends false ? (...args: Parameters<F>) => Promise<Awaited<ReturnType<F>>> : F

Wrap a function with traced, using the arguments as input and return value as output. Any functions wrapped this way will automatically be traced, similar to the @traced decorator in Python. If you want to correctly propagate the function's name and define it in one go, then you can do so like this:

const myFunc = wrapTraced(async function myFunc(input) {
  const result = await client.chat.completions.create({
    model: "gpt-3.5-turbo",
    messages: [{ role: "user", content: input }],
  });
  return result.choices[0].message.content ?? "unknown";
});

Now, any calls to myFunc will be traced, and the input and output will be logged automatically. If tracing is inactive, i.e. there is no active logger or experiment, it's just a no-op.

If you're using NextJS or another framework that minifies your code before deployment, the function name will be obfuscated when deployed. To trace the name properly, you can specify it in the span-level arguments for wrapTraced like so.

const myFunc = wrapTraced(
  async function myFunc(input) {
    const result = await client.chat.completions.create({
      model: "gpt-3.5-turbo",
      messages: [{ role: "user", content: input }],
    });
    return result.choices[0].message.content ?? "unknown";
  },
  { name: "myFunc" },
);

Type parameters

NameType
Fextends (...args: any[]) => any
IsAsyncFlushextends boolean = true

Parameters

NameTypeDescription
fnFThe function to wrap.
args?StartSpanArgs & SetCurrentArg & AsyncFlushArg<IsAsyncFlush>Span-level arguments (e.g. a custom name or type) to pass to traced.

Returns

IsAsyncFlush extends false ? (...args: Parameters<F>) => Promise<Awaited<ReturnType<F>>> : F

The wrapped function.

Type Aliases

AnyDataset

Ƭ AnyDataset: Dataset<boolean>


BaseExperiment

Ƭ BaseExperiment<Input, Expected, Metadata>: Object

Type parameters

NameType
InputInput
ExpectedExpected
Metadataextends BaseMetadata = DefaultMetadataType

Type declaration

NameType
_phantom?[Input, Expected, Metadata]
_type"BaseExperiment"
name?string

BaseMetadata

Ƭ BaseMetadata: Record<string, unknown> | void


BraintrustStreamChunk

Ƭ BraintrustStreamChunk: z.infer<typeof braintrustStreamChunkSchema>

A chunk of data from a Braintrust stream. Each chunk type matches an SSE event type.


ChatPrompt

Ƭ ChatPrompt: Object

Type declaration

NameType
messagesOpenAIMessage[]
tools?any[]

CodeOpts

Ƭ CodeOpts<Params, Returns, Fn>: Partial<BaseFnOpts> & { handler: Fn } & Schema<Params, Returns>

Type parameters

NameType
ParamsParams
ReturnsReturns
Fnextends GenericFunction<Params, Returns>

CommentEvent

Ƭ CommentEvent: IdField & { _audit_metadata?: Record<string, unknown> ; _audit_source: Source ; comment: { text: string } ; created: string ; origin: { id: string } } & ParentExperimentIds | ParentProjectLogIds | ParentPlaygroundLogIds


CompiledPrompt

Ƭ CompiledPrompt<Flavor>: CompiledPromptParams & { span_info?: { metadata: { prompt: { id: string ; project_id: string ; variables: Record<string, unknown> ; version: string } } ; name?: string ; spanAttributes?: Record<any, any> } } & Flavor extends "chat" ? ChatPrompt : Flavor extends "completion" ? CompletionPrompt : {}

Type parameters

NameType
Flavorextends "chat" | "completion"

CompiledPromptParams

Ƭ CompiledPromptParams: Omit<NonNullable<PromptData["options"]>["params"], "use_cache"> & { model: NonNullable<NonNullable<PromptData["options"]>["model"]> }


CompletionPrompt

Ƭ CompletionPrompt: Object

Type declaration

NameType
promptstring

CreateProjectOpts

Ƭ CreateProjectOpts: NameOrId


DatasetRecord

Ƭ DatasetRecord<IsLegacyDataset>: IsLegacyDataset extends true ? LegacyDatasetRecord : NewDatasetRecord

Type parameters

NameType
IsLegacyDatasetextends boolean = typeof DEFAULT_IS_LEGACY_DATASET

DefaultMetadataType

Ƭ DefaultMetadataType: void


DefaultPromptArgs

Ƭ DefaultPromptArgs: Partial<CompiledPromptParams & AnyModelParam & ChatPrompt & CompletionPrompt>


EndSpanArgs

Ƭ EndSpanArgs: Object

Type declaration

NameType
endTime?number

EvalCase

Ƭ EvalCase<Input, Expected, Metadata>: { _xact_id?: TransactionId ; created?: string | null ; id?: string ; input: Input ; tags?: string[] ; upsert_id?: string } & Expected extends void ? object : { expected: Expected } & Metadata extends void ? object : { metadata: Metadata }

Type parameters

Name
Input
Expected
Metadata

EvalParameterSerializedSchema

Ƭ EvalParameterSerializedSchema: z.infer<typeof evalParametersSerializedSchema>


EvalParameters

Ƭ EvalParameters: z.infer<typeof evalParametersSchema>


EvalResult

Ƭ EvalResult<Input, Output, Expected, Metadata>: EvalCase<Input, Expected, Metadata> & { error: unknown ; origin?: ObjectReference ; output: Output ; scores: Record<string, number | null> }

Type parameters

NameType
InputInput
OutputOutput
ExpectedExpected
Metadataextends BaseMetadata = DefaultMetadataType

EvalScorer

Ƭ EvalScorer<Input, Output, Expected, Metadata>: (args: EvalScorerArgs<Input, Output, Expected, Metadata>) => OneOrMoreScores | Promise<OneOrMoreScores>

Type parameters

NameType
InputInput
OutputOutput
ExpectedExpected
Metadataextends BaseMetadata = DefaultMetadataType

Type declaration

▸ (args): OneOrMoreScores | Promise<OneOrMoreScores>

Parameters
NameType
argsEvalScorerArgs<Input, Output, Expected, Metadata>
Returns

OneOrMoreScores | Promise<OneOrMoreScores>


EvalScorerArgs

Ƭ EvalScorerArgs<Input, Output, Expected, Metadata>: EvalCase<Input, Expected, Metadata> & { output: Output }

Type parameters

NameType
InputInput
OutputOutput
ExpectedExpected
Metadataextends BaseMetadata = DefaultMetadataType

EvalTask

Ƭ EvalTask<Input, Output, Expected, Metadata, Parameters>: (input: Input, hooks: EvalHooks<Expected, Metadata, Parameters>) => Promise<Output> | (input: Input, hooks: EvalHooks<Expected, Metadata, Parameters>) => Output

Type parameters

NameType
InputInput
OutputOutput
ExpectedExpected
Metadataextends BaseMetadata
Parametersextends EvalParameters

EvaluatorDef

Ƭ EvaluatorDef<Input, Output, Expected, Metadata, Parameters>: { evalName: string ; projectName: string } & Evaluator<Input, Output, Expected, Metadata, Parameters>

Type parameters

NameType
InputInput
OutputOutput
ExpectedExpected
Metadataextends BaseMetadata = DefaultMetadataType
Parametersextends EvalParameters = EvalParameters

EvaluatorDefinition

Ƭ EvaluatorDefinition: z.infer<typeof evaluatorDefinitionSchema>


EvaluatorDefinitions

Ƭ EvaluatorDefinitions: z.infer<typeof evaluatorDefinitionsSchema>


EvaluatorFile

Ƭ EvaluatorFile: Object

Type declaration

NameType
evaluators{ [evalName: string]: { evaluator: EvaluatorDef<unknown, unknown, unknown, BaseMetadata, EvalParameters> ; reporter?: ReporterDef<unknown> | string }; }
functionsCodeFunction<unknown, unknown, GenericFunction<unknown, unknown>>[]
promptsCodePrompt[]
reporters{ [reporterName: string]: ReporterDef<unknown>; }

EvaluatorManifest

Ƭ EvaluatorManifest: Record<string, EvaluatorDef<unknown, unknown, unknown, BaseMetadata>>


ExperimentLogFullArgs

Ƭ ExperimentLogFullArgs: Partial<Omit<OtherExperimentLogFields, "output" | "scores">> & Required<Pick<OtherExperimentLogFields, "output" | "scores">> & Partial<InputField> & Partial<IdField>


ExperimentLogPartialArgs

Ƭ ExperimentLogPartialArgs: Partial<OtherExperimentLogFields> & Partial<InputField>


FullInitOptions

Ƭ FullInitOptions<IsOpen>: { project?: string } & InitOptions<IsOpen>

Type parameters

NameType
IsOpenextends boolean

FullLoginOptions

Ƭ FullLoginOptions: LoginOptions & { forceLogin?: boolean }


IdField

Ƭ IdField: Object

Type declaration

NameType
idstring

InitOptions

Ƭ InitOptions<IsOpen>: FullLoginOptions & { baseExperiment?: string ; baseExperimentId?: string ; dataset?: AnyDataset ; description?: string ; experiment?: string ; gitMetadataSettings?: GitMetadataSettings ; isPublic?: boolean ; metadata?: Record<string, unknown> ; projectId?: string ; repoInfo?: RepoInfo ; setCurrent?: boolean ; state?: BraintrustState ; update?: boolean } & InitOpenOption<IsOpen>

Type parameters

NameType
IsOpenextends boolean

InputField

Ƭ InputField: Object

Type declaration

NameType
inputunknown

InvokeReturn

Ƭ InvokeReturn<Stream, Output>: Stream extends true ? BraintrustStream : Output

The return type of the invoke function. Conditionally returns a BraintrustStream if stream is true, otherwise returns the output of the function using the Zod schema's type if present.

Type parameters

NameType
Streamextends boolean
OutputOutput

LogCommentFullArgs

Ƭ LogCommentFullArgs: IdField & { _audit_metadata?: Record<string, unknown> ; _audit_source: Source ; comment: { text: string } ; created: string ; origin: { id: string } } & ParentExperimentIds | ParentProjectLogIds


LogFeedbackFullArgs

Ƭ LogFeedbackFullArgs: IdField & Partial<Omit<OtherExperimentLogFields, "output" | "metrics" | "datasetRecordId"> & { comment: string ; source: Source }>


OtherExperimentLogFields

Ƭ OtherExperimentLogFields: Object

Type declaration

NameType
_async_scoring_controlAsyncScoringControl
_merge_pathsstring[][]
_skip_async_scoringboolean
datasetRecordIdstring
errorunknown
expectedunknown
metadataRecord<string, unknown>
metricsRecord<string, unknown>
originz.infer<typeof objectReferenceSchema>
outputunknown
scoresRecord<string, number | null>
span_attributesRecord<string, unknown>
tagsstring[]

PromiseUnless

Ƭ PromiseUnless<B, R>: B extends true ? R : Promise<Awaited<R>>

Type parameters

Name
B
R

PromptContents

Ƭ PromptContents: z.infer<typeof promptContentsSchema>


PromptDefinition

Ƭ PromptDefinition: z.infer<typeof promptDefinitionSchema>


PromptDefinitionWithTools

Ƭ PromptDefinitionWithTools: z.infer<typeof promptDefinitionWithToolsSchema>


PromptOpts

Ƭ PromptOpts<HasId, HasVersion, HasTools, HasNoTrace>: Partial<Omit<BaseFnOpts, "name">> & { name: string } & HasId extends true ? PromptId : Partial<PromptId> & HasVersion extends true ? PromptVersion : Partial<PromptVersion> & HasTools extends true ? Partial<PromptTools> : {} & HasNoTrace extends true ? Partial<PromptNoTrace> : {} & PromptDefinition

Type parameters

NameType
HasIdextends boolean
HasVersionextends boolean
HasToolsextends boolean = true
HasNoTraceextends boolean = true

PromptRowWithId

Ƭ PromptRowWithId<HasId, HasVersion>: Omit<PromptRow, "log_id" | "org_id" | "project_id" | "id" | "_xact_id"> & Partial<Pick<PromptRow, "project_id">> & HasId extends true ? Pick<PromptRow, "id"> : Partial<Pick<PromptRow, "id">> & HasVersion extends true ? Pick<PromptRow, "_xact_id"> : Partial<Pick<PromptRow, "_xact_id">>

Type parameters

NameType
HasIdextends boolean = true
HasVersionextends boolean = true

ScorerOpts

Ƭ ScorerOpts<Output, Input, Params, Returns, Fn>: CodeOpts<Exact<Params, ScorerArgs<Output, Input>>, Returns, Fn> | ScorerPromptOpts

Type parameters

NameType
OutputOutput
InputInput
ParamsParams
ReturnsReturns
Fnextends GenericFunction<Exact<Params, ScorerArgs<Output, Input>>, Returns>

SerializedBraintrustState

Ƭ SerializedBraintrustState: z.infer<typeof loginSchema>


SetCurrentArg

Ƭ SetCurrentArg: Object

Type declaration

NameType
setCurrent?boolean

SpanContext

Ƭ SpanContext: Object

Type declaration

NameType
NOOP_SPANtypeof NOOP_SPAN
currentSpantypeof currentSpan
startSpantypeof startSpan
withCurrenttypeof withCurrent

StartSpanArgs

Ƭ StartSpanArgs: Object

Type declaration

NameType
event?StartSpanEventArgs
name?string
parent?string
propagatedEvent?StartSpanEventArgs
spanAttributes?Record<any, any>
startTime?number
type?SpanType

ToolFunctionDefinition

Ƭ ToolFunctionDefinition: z.infer<typeof toolFunctionDefinitionSchema>


WithTransactionId

Ƭ WithTransactionId<R>: R & { _xact_id: TransactionId }

Type parameters

Name
R

Variables

Const ERR_PERMALINK: "https://braintrust.dev/error-generating-link"


INTERNAL_BTQL_LIMIT

Const INTERNAL_BTQL_LIMIT: 1000


LEGACY_CACHED_HEADER

Const LEGACY_CACHED_HEADER: "x-cached"


NOOP_SPAN

Const NOOP_SPAN: NoopSpan


Const NOOP_SPAN_PERMALINK: "https://braintrust.dev/noop-span"


X_CACHED_HEADER

Const X_CACHED_HEADER: "x-bt-cached"


_exportsForTestingOnly

Const _exportsForTestingOnly: Object

Type declaration

NameType
clearTestBackgroundLogger() => void
deepCopyEvent<T>(event: T) => T
extractAttachments(event: Record<string, any>, attachments: BaseAttachment[]) => void
simulateLoginForTests() => Promise<BraintrustState>
simulateLogoutForTests() => BraintrustState
useTestBackgroundLogger() => TestBackgroundLogger

braintrustStreamChunkSchema

Const braintrustStreamChunkSchema: ZodUnion<[ZodObject<{ data: ZodString ; type: ZodLiteral<"text_delta"> }, "strip", ZodTypeAny, { data: string ; type: "text_delta" }, { data: string ; type: "text_delta" }>, ZodObject<{ data: ZodString ; type: ZodLiteral<"reasoning_delta"> }, "strip", ZodTypeAny, { data: string ; type: "reasoning_delta" }, { data: string ; type: "reasoning_delta" }>, ZodObject<{ data: ZodString ; type: ZodLiteral<"json_delta"> }, "strip", ZodTypeAny, { data: string ; type: "json_delta" }, { data: string ; type: "json_delta" }>]>


evaluatorDefinitionSchema

Const evaluatorDefinitionSchema: ZodObject<{ parameters: ZodOptional<ZodRecord<ZodString, ZodUnion<[ZodObject<{ default: ZodOptional<ZodObject<{ options: ZodOptional<ZodNullable<ZodObject<{ model: ZodOptional<ZodString> ; params: ZodOptional<ZodUnion<[ZodObject<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>]>> ; position: ZodOptional<ZodString> }, "strip", ZodTypeAny, { model?: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string }, { model?: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string }>>> ; origin: ZodOptional<ZodNullable<ZodObject<{ project_id: ZodOptional<ZodString> ; prompt_id: ZodOptional<ZodString> ; prompt_version: ZodOptional<ZodString> }, "strip", ZodTypeAny, { project_id?: string ; prompt_id?: string ; prompt_version?: string }, { project_id?: string ; prompt_id?: string ; prompt_version?: string }>>> ; parser: ZodOptional<ZodNullable<ZodObject<{ choice_scores: ZodRecord<ZodString, ZodNumber> ; type: ZodLiteral<"llm_classifier"> ; use_cot: ZodBoolean }, "strip", ZodTypeAny, { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean }, { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean }>>> ; prompt: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ content: ZodString ; type: ZodLiteral<"completion"> }, "strip", ZodTypeAny, { content: string ; type: "completion" }, { content: string ; type: "completion" }>, ZodObject<{ messages: ZodArray<ZodUnion<[ZodUnion<[ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"system"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "system" }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodUnion<[ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, ZodObject<{ image_url: ZodObject<{ detail: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"low">, ZodLiteral<"high">]>> ; url: ZodString }, "strip", ZodTypeAny, { detail?: "auto" | "high" | "low" ; url: string }, { detail?: "auto" | "high" | "low" ; url: string }> ; type: ZodLiteral<"image_url"> }, "strip", ZodTypeAny, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }>]>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"user"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "user" }, { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" }>, ZodObject<{ content: ZodOptional<ZodNullable<ZodUnion<[ZodString, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]>>> ; function_call: ZodEffects<ZodOptional<ZodNullable<ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }>>>, undefined | { arguments: string ; name: string }, undefined | null | { arguments: string ; name: string }> ; name: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; reasoning: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ content: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; id: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> }, "strip", ZodTypeAny, { content?: string ; id?: string }, { content?: null | string ; id?: null | string }>, "many">>>, undefined | { content?: string ; id?: string }[], undefined | null | { content?: null | string ; id?: null | string }[]> ; role: ZodLiteral<"assistant"> ; tool_calls: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ function: ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }> ; id: ZodString ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { arguments: string ; name: string } ; id: string ; type: "function" }, { function: { arguments: string ; name: string } ; id: string ; type: "function" }>, "many">>>, undefined | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[], undefined | null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[]> }, "strip", ZodTypeAny, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; role: ZodLiteral<"tool"> ; tool_call_id: ZodDefault<ZodString> }, "strip", ZodTypeAny, { content: {} ; role: "tool" ; tool_call_id: string }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string }>, ZodObject<{ content: ZodNullable<ZodString> ; name: ZodString ; role: ZodLiteral<"function"> }, "strip", ZodTypeAny, { content: null | string ; name: string ; role: "function" }, { content: null | string ; name: string ; role: "function" }>]>, ZodObject<{ content: ZodOptional<ZodNullable<ZodString>> ; role: ZodEnum<["model"]> }, "strip", ZodTypeAny, { content?: null | string ; role: "model" }, { content?: null | string ; role: "model" }>]>, "many"> ; tools: ZodOptional<ZodString> ; type: ZodLiteral<"chat"> }, "strip", ZodTypeAny, { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" }, { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" }>]>>> ; tool_functions: ZodOptional<ZodNullable<ZodArray<ZodUnion<[ZodObject<{ id: ZodString ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { id: string ; type: "function" }, { id: string ; type: "function" }>, ZodObject<{ name: ZodString ; type: ZodLiteral<"global"> }, "strip", ZodTypeAny, { name: string ; type: "global" }, { name: string ; type: "global" }>]>, "many">>> }, "strip", ZodTypeAny, { options?: null | { model?: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] }, { options?: null | { model?: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] }>> ; description: ZodOptional<ZodString> ; type: ZodLiteral<"prompt"> }, "strip", ZodTypeAny, { default?: { options?: null | { model?: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] } ; description?: string ; type: "prompt" }, { default?: { options?: null | { model?: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] } ; description?: string ; type: "prompt" }>, ZodObject<{ default: ZodOptional<ZodUnknown> ; description: ZodOptional<ZodString> ; schema: ZodRecord<ZodString, ZodUnknown> ; type: ZodLiteral<"data"> }, "strip", ZodTypeAny, { default?: unknown ; description?: string ; schema: Record<string, unknown> ; type: "data" }, { default?: unknown ; description?: string ; schema: Record<string, unknown> ; type: "data" }>]>>> }, "strip", ZodTypeAny, { parameters?: Record<string, { type: "prompt"; default?: { prompt?: { type: "completion"; content: string; } | { type: "chat"; messages: ({ content: (string | { type: "text"; text: string; cache_control?: { type: "ephemeral"; } | undefined; }[]) & (string | ... 1 more ... | undefined); role: "system"; name?: string | undefined; } | ... 4 more .... | { type: "data"; schema: Record<string, unknown>; default?: unknown; description?: string | undefined; }> }, { parameters?: Record<string, { type: "prompt"; default?: { prompt?: { type: "completion"; content: string; } | { type: "chat"; messages: ({ role: "system"; content?: string | { type: "text"; text?: string | undefined; cache_control?: { ...; } | undefined; }[] | undefined; name?: string | undefined; } | ... 4 more ... | { ...; })[]; tools?: stri... | { type: "data"; schema: Record<string, unknown>; default?: unknown; description?: string | undefined; }> }>


evaluatorDefinitionsSchema

Const evaluatorDefinitionsSchema: ZodRecord<ZodString, ZodObject<{ parameters: ZodOptional<ZodRecord<ZodString, ZodUnion<[ZodObject<{ default: ZodOptional<ZodObject<{ options: ZodOptional<ZodNullable<ZodObject<{ model: ZodOptional<ZodString> ; params: ZodOptional<ZodUnion<[ZodObject<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>]>> ; position: ZodOptional<ZodString> }, "strip", ZodTypeAny, { model?: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string }, { model?: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string }>>> ; origin: ZodOptional<ZodNullable<ZodObject<{ project_id: ZodOptional<ZodString> ; prompt_id: ZodOptional<ZodString> ; prompt_version: ZodOptional<ZodString> }, "strip", ZodTypeAny, { project_id?: string ; prompt_id?: string ; prompt_version?: string }, { project_id?: string ; prompt_id?: string ; prompt_version?: string }>>> ; parser: ZodOptional<ZodNullable<ZodObject<{ choice_scores: ZodRecord<ZodString, ZodNumber> ; type: ZodLiteral<"llm_classifier"> ; use_cot: ZodBoolean }, "strip", ZodTypeAny, { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean }, { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean }>>> ; prompt: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ content: ZodString ; type: ZodLiteral<"completion"> }, "strip", ZodTypeAny, { content: string ; type: "completion" }, { content: string ; type: "completion" }>, ZodObject<{ messages: ZodArray<ZodUnion<[ZodUnion<[ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"system"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "system" }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodUnion<[ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, ZodObject<{ image_url: ZodObject<{ detail: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"low">, ZodLiteral<"high">]>> ; url: ZodString }, "strip", ZodTypeAny, { detail?: "auto" | "high" | "low" ; url: string }, { detail?: "auto" | "high" | "low" ; url: string }> ; type: ZodLiteral<"image_url"> }, "strip", ZodTypeAny, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }>]>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"user"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "user" }, { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" }>, ZodObject<{ content: ZodOptional<ZodNullable<ZodUnion<[ZodString, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]>>> ; function_call: ZodEffects<ZodOptional<ZodNullable<ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }>>>, undefined | { arguments: string ; name: string }, undefined | null | { arguments: string ; name: string }> ; name: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; reasoning: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ content: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; id: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> }, "strip", ZodTypeAny, { content?: string ; id?: string }, { content?: null | string ; id?: null | string }>, "many">>>, undefined | { content?: string ; id?: string }[], undefined | null | { content?: null | string ; id?: null | string }[]> ; role: ZodLiteral<"assistant"> ; tool_calls: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ function: ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }> ; id: ZodString ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { arguments: string ; name: string } ; id: string ; type: "function" }, { function: { arguments: string ; name: string } ; id: string ; type: "function" }>, "many">>>, undefined | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[], undefined | null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[]> }, "strip", ZodTypeAny, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; role: ZodLiteral<"tool"> ; tool_call_id: ZodDefault<ZodString> }, "strip", ZodTypeAny, { content: {} ; role: "tool" ; tool_call_id: string }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string }>, ZodObject<{ content: ZodNullable<ZodString> ; name: ZodString ; role: ZodLiteral<"function"> }, "strip", ZodTypeAny, { content: null | string ; name: string ; role: "function" }, { content: null | string ; name: string ; role: "function" }>]>, ZodObject<{ content: ZodOptional<ZodNullable<ZodString>> ; role: ZodEnum<["model"]> }, "strip", ZodTypeAny, { content?: null | string ; role: "model" }, { content?: null | string ; role: "model" }>]>, "many"> ; tools: ZodOptional<ZodString> ; type: ZodLiteral<"chat"> }, "strip", ZodTypeAny, { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" }, { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" }>]>>> ; tool_functions: ZodOptional<ZodNullable<ZodArray<ZodUnion<[ZodObject<{ id: ZodString ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { id: string ; type: "function" }, { id: string ; type: "function" }>, ZodObject<{ name: ZodString ; type: ZodLiteral<"global"> }, "strip", ZodTypeAny, { name: string ; type: "global" }, { name: string ; type: "global" }>]>, "many">>> }, "strip", ZodTypeAny, { options?: null | { model?: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] }, { options?: null | { model?: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] }>> ; description: ZodOptional<ZodString> ; type: ZodLiteral<"prompt"> }, "strip", ZodTypeAny, { default?: { options?: null | { model?: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] } ; description?: string ; type: "prompt" }, { default?: { options?: null | { model?: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> ; position?: string } ; origin?: null | { project_id?: string ; prompt_id?: string ; prompt_version?: string } ; parser?: null | { choice_scores: Record<string, number> ; type: "llm_classifier" ; use_cot: boolean } ; prompt?: null | { content: string ; type: "completion" } | { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: null | string ; role: "model" })[] ; tools?: string ; type: "chat" } ; tool_functions?: null | ({ id: string ; type: "function" } | { name: string ; type: "global" })[] } ; description?: string ; type: "prompt" }>, ZodObject<{ default: ZodOptional<ZodUnknown> ; description: ZodOptional<ZodString> ; schema: ZodRecord<ZodString, ZodUnknown> ; type: ZodLiteral<"data"> }, "strip", ZodTypeAny, { default?: unknown ; description?: string ; schema: Record<string, unknown> ; type: "data" }, { default?: unknown ; description?: string ; schema: Record<string, unknown> ; type: "data" }>]>>> }, "strip", ZodTypeAny, { parameters?: Record<string, { type: "prompt"; default?: { prompt?: { type: "completion"; content: string; } | { type: "chat"; messages: ({ content: (string | { type: "text"; text: string; cache_control?: { type: "ephemeral"; } | undefined; }[]) & (string | ... 1 more ... | undefined); role: "system"; name?: string | undefined; } | ... 4 more .... | { type: "data"; schema: Record<string, unknown>; default?: unknown; description?: string | undefined; }> }, { parameters?: Record<string, { type: "prompt"; default?: { prompt?: { type: "completion"; content: string; } | { type: "chat"; messages: ({ role: "system"; content?: string | { type: "text"; text?: string | undefined; cache_control?: { ...; } | undefined; }[] | undefined; name?: string | undefined; } | ... 4 more ... | { ...; })[]; tools?: stri... | { type: "data"; schema: Record<string, unknown>; default?: unknown; description?: string | undefined; }> }>>


projects

Const projects: ProjectBuilder


promptContentsSchema

Const promptContentsSchema: ZodUnion<[ZodObject<{ prompt: ZodString }, "strip", ZodTypeAny, { prompt: string }, { prompt: string }>, ZodObject<{ messages: ZodArray<ZodUnion<[ZodUnion<[ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"system"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "system" }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodUnion<[ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, ZodObject<{ image_url: ZodObject<{ detail: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"low">, ZodLiteral<"high">]>> ; url: ZodString }, "strip", ZodTypeAny, { detail?: "auto" | "high" | "low" ; url: string }, { detail?: "auto" | "high" | "low" ; url: string }> ; type: ZodLiteral<"image_url"> }, "strip", ZodTypeAny, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }>]>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"user"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "user" }, { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" }>, ZodObject<{ content: ZodOptional<ZodNullable<ZodUnion<[ZodString, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]>>> ; function_call: ZodEffects<ZodOptional<ZodNullable<ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }>>>, undefined | { arguments: string ; name: string }, undefined | null | { arguments: string ; name: string }> ; name: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; reasoning: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ content: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; id: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> }, "strip", ZodTypeAny, { content?: string ; id?: string }, { content?: null | string ; id?: null | string }>, "many">>>, undefined | { content?: string ; id?: string }[], undefined | null | { content?: null | string ; id?: null | string }[]> ; role: ZodLiteral<"assistant"> ; tool_calls: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ function: ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }> ; id: ZodString ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { arguments: string ; name: string } ; id: string ; type: "function" }, { function: { arguments: string ; name: string } ; id: string ; type: "function" }>, "many">>>, undefined | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[], undefined | null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[]> }, "strip", ZodTypeAny, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; role: ZodLiteral<"tool"> ; tool_call_id: ZodDefault<ZodString> }, "strip", ZodTypeAny, { content: {} ; role: "tool" ; tool_call_id: string }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string }>, ZodObject<{ content: ZodNullable<ZodString> ; name: ZodString ; role: ZodLiteral<"function"> }, "strip", ZodTypeAny, { content: null | string ; name: string ; role: "function" }, { content: null | string ; name: string ; role: "function" }>]>, ZodObject<{ content: ZodOptional<ZodNullable<ZodString>> ; role: ZodEnum<["model"]> }, "strip", ZodTypeAny, { content?: null | string ; role: "model" }, { content?: null | string ; role: "model" }>]>, "many"> }, "strip", ZodTypeAny, { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string ; role: "model" })[] }, { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string ; role: "model" })[] }>]>


promptDefinitionSchema

Const promptDefinitionSchema: ZodIntersection<ZodUnion<[ZodObject<{ prompt: ZodString }, "strip", ZodTypeAny, { prompt: string }, { prompt: string }>, ZodObject<{ messages: ZodArray<ZodUnion<[ZodUnion<[ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"system"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "system" }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodUnion<[ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, ZodObject<{ image_url: ZodObject<{ detail: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"low">, ZodLiteral<"high">]>> ; url: ZodString }, "strip", ZodTypeAny, { detail?: "auto" | "high" | "low" ; url: string }, { detail?: "auto" | "high" | "low" ; url: string }> ; type: ZodLiteral<"image_url"> }, "strip", ZodTypeAny, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }>]>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"user"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "user" }, { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" }>, ZodObject<{ content: ZodOptional<ZodNullable<ZodUnion<[ZodString, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]>>> ; function_call: ZodEffects<ZodOptional<ZodNullable<ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }>>>, undefined | { arguments: string ; name: string }, undefined | null | { arguments: string ; name: string }> ; name: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; reasoning: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ content: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; id: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> }, "strip", ZodTypeAny, { content?: string ; id?: string }, { content?: null | string ; id?: null | string }>, "many">>>, undefined | { content?: string ; id?: string }[], undefined | null | { content?: null | string ; id?: null | string }[]> ; role: ZodLiteral<"assistant"> ; tool_calls: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ function: ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }> ; id: ZodString ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { arguments: string ; name: string } ; id: string ; type: "function" }, { function: { arguments: string ; name: string } ; id: string ; type: "function" }>, "many">>>, undefined | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[], undefined | null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[]> }, "strip", ZodTypeAny, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; role: ZodLiteral<"tool"> ; tool_call_id: ZodDefault<ZodString> }, "strip", ZodTypeAny, { content: {} ; role: "tool" ; tool_call_id: string }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string }>, ZodObject<{ content: ZodNullable<ZodString> ; name: ZodString ; role: ZodLiteral<"function"> }, "strip", ZodTypeAny, { content: null | string ; name: string ; role: "function" }, { content: null | string ; name: string ; role: "function" }>]>, ZodObject<{ content: ZodOptional<ZodNullable<ZodString>> ; role: ZodEnum<["model"]> }, "strip", ZodTypeAny, { content?: null | string ; role: "model" }, { content?: null | string ; role: "model" }>]>, "many"> }, "strip", ZodTypeAny, { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string ; role: "model" })[] }, { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string ; role: "model" })[] }>]>, ZodObject<{ model: ZodString ; params: ZodOptional<ZodUnion<[ZodObject<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>]>> }, "strip", ZodTypeAny, { model: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> }, { model: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> }>>


promptDefinitionWithToolsSchema

Const promptDefinitionWithToolsSchema: ZodIntersection<ZodIntersection<ZodUnion<[ZodObject<{ prompt: ZodString }, "strip", ZodTypeAny, { prompt: string }, { prompt: string }>, ZodObject<{ messages: ZodArray<ZodUnion<[ZodUnion<[ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"system"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "system" }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodUnion<[ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, ZodObject<{ image_url: ZodObject<{ detail: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"low">, ZodLiteral<"high">]>> ; url: ZodString }, "strip", ZodTypeAny, { detail?: "auto" | "high" | "low" ; url: string }, { detail?: "auto" | "high" | "low" ; url: string }> ; type: ZodLiteral<"image_url"> }, "strip", ZodTypeAny, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }, { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" }>]>, "many">]> ; name: ZodOptional<ZodString> ; role: ZodLiteral<"user"> }, "strip", ZodTypeAny, { content: {} ; name?: string ; role: "user" }, { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" }>, ZodObject<{ content: ZodOptional<ZodNullable<ZodUnion<[ZodString, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]>>> ; function_call: ZodEffects<ZodOptional<ZodNullable<ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }>>>, undefined | { arguments: string ; name: string }, undefined | null | { arguments: string ; name: string }> ; name: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; reasoning: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ content: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> ; id: ZodEffects<ZodOptional<ZodNullable<ZodString>>, undefined | string, undefined | null | string> }, "strip", ZodTypeAny, { content?: string ; id?: string }, { content?: null | string ; id?: null | string }>, "many">>>, undefined | { content?: string ; id?: string }[], undefined | null | { content?: null | string ; id?: null | string }[]> ; role: ZodLiteral<"assistant"> ; tool_calls: ZodEffects<ZodOptional<ZodNullable<ZodArray<ZodObject<{ function: ZodObject<{ arguments: ZodString ; name: ZodString }, "strip", ZodTypeAny, { arguments: string ; name: string }, { arguments: string ; name: string }> ; id: ZodString ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { arguments: string ; name: string } ; id: string ; type: "function" }, { function: { arguments: string ; name: string } ; id: string ; type: "function" }>, "many">>>, undefined | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[], undefined | null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[]> }, "strip", ZodTypeAny, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }, { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] }>, ZodObject<{ content: ZodUnion<[ZodDefault<ZodString>, ZodArray<ZodObject<{ cache_control: ZodOptional<ZodObject<{ type: ZodEnum<["ephemeral"]> }, "strip", ZodTypeAny, { type: "ephemeral" }, { type: "ephemeral" }>> ; text: ZodDefault<ZodString> ; type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }, { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }>, "many">]> ; role: ZodLiteral<"tool"> ; tool_call_id: ZodDefault<ZodString> }, "strip", ZodTypeAny, { content: {} ; role: "tool" ; tool_call_id: string }, { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string }>, ZodObject<{ content: ZodNullable<ZodString> ; name: ZodString ; role: ZodLiteral<"function"> }, "strip", ZodTypeAny, { content: null | string ; name: string ; role: "function" }, { content: null | string ; name: string ; role: "function" }>]>, ZodObject<{ content: ZodOptional<ZodNullable<ZodString>> ; role: ZodEnum<["model"]> }, "strip", ZodTypeAny, { content?: null | string ; role: "model" }, { content?: null | string ; role: "model" }>]>, "many"> }, "strip", ZodTypeAny, { messages: ({ content: {} ; name?: string ; role: "system" } | { content: {} ; name?: string ; role: "user" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text: string ; type: "text" }[] ; function_call?: { arguments: string ; name: string } ; name?: string ; reasoning?: { content?: string ; id?: string }[] ; role: "assistant" ; tool_calls?: { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content: {} ; role: "tool" ; tool_call_id: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string ; role: "model" })[] }, { messages: ({ content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; name?: string ; role: "system" } | { content?: string | ({ cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" } | { image_url: { detail?: "auto" | "high" | "low" ; url: string } ; type: "image_url" })[] ; name?: string ; role: "user" } | { content?: null | string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; function_call?: null | { arguments: string ; name: string } ; name?: null | string ; reasoning?: null | { content?: null | string ; id?: null | string }[] ; role: "assistant" ; tool_calls?: null | { function: { arguments: string ; name: string } ; id: string ; type: "function" }[] } | { content?: string | { cache_control?: { type: "ephemeral" } ; text?: string ; type: "text" }[] ; role: "tool" ; tool_call_id?: string } | { content: null | string ; name: string ; role: "function" } | { content?: null | string ; role: "model" })[] }>]>, ZodObject<{ model: ZodString ; params: ZodOptional<ZodUnion<[ZodObject<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>, ZodObject<{ use_cache: ZodOptional<ZodBoolean> }, "passthrough", ZodTypeAny, objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">, objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough">>]>> }, "strip", ZodTypeAny, { model: string ; params?: objectOutputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectOutputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> }, { model: string ; params?: objectInputType<{ frequency_penalty: ZodOptional<ZodNumber> ; function_call: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }>]>> ; max_completion_tokens: ZodOptional<ZodNumber> ; max_tokens: ZodOptional<ZodNumber> ; n: ZodOptional<ZodNumber> ; presence_penalty: ZodOptional<ZodNumber> ; reasoning_effort: ZodOptional<ZodEnum<["low", "medium", "high"]>> ; response_format: ZodOptional<ZodNullable<ZodUnion<[ZodObject<{ type: ZodLiteral<"json_object"> }, "strip", ZodTypeAny, { type: "json_object" }, { type: "json_object" }>, ZodObject<{ json_schema: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; schema: ZodOptional<ZodUnion<[ZodRecord<ZodString, ZodUnknown>, ZodString]>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"json_schema"> }, "strip", ZodTypeAny, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }, { json_schema: { description?: string ; name: string ; schema?: string | Record<string, unknown> ; strict?: null | boolean } ; type: "json_schema" }>, ZodObject<{ type: ZodLiteral<"text"> }, "strip", ZodTypeAny, { type: "text" }, { type: "text" }>]>>> ; stop: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodOptional<ZodNumber> ; tool_choice: ZodOptional<ZodUnion<[ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject<{ function: ZodObject<{ name: ZodString }, "strip", ZodTypeAny, { name: string }, { name: string }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { name: string } ; type: "function" }, { function: { name: string } ; type: "function" }>]>> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ max_tokens: ZodNumber ; max_tokens_to_sample: ZodOptional<ZodNumber> ; stop_sequences: ZodOptional<ZodArray<ZodString, "many">> ; temperature: ZodNumber ; top_k: ZodOptional<ZodNumber> ; top_p: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ maxOutputTokens: ZodOptional<ZodNumber> ; temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; topP: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ temperature: ZodOptional<ZodNumber> ; topK: ZodOptional<ZodNumber> ; use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> | objectInputType<{ use_cache: ZodOptional<ZodBoolean> }, ZodTypeAny, "passthrough"> }>>, ZodObject<{ tools: ZodOptional<ZodArray<ZodObject<{ function: ZodObject<{ description: ZodOptional<ZodString> ; name: ZodString ; parameters: ZodOptional<ZodRecord<ZodString, ZodUnknown>> ; strict: ZodOptional<ZodNullable<ZodBoolean>> }, "strip", ZodTypeAny, { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean }, { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean }> ; type: ZodLiteral<"function"> }, "strip", ZodTypeAny, { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }, { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }>, "many">> }, "strip", ZodTypeAny, { tools?: { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[] }, { tools?: { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: null | boolean } ; type: "function" }[] }>>


toolFunctionDefinitionSchema

Const toolFunctionDefinitionSchema: z.ZodObject<{ function: z.ZodObject<{ description: z.ZodOptional<z.ZodString> ; name: z.ZodString ; parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>> ; strict: z.ZodOptional<z.ZodNullable<z.ZodBoolean>> }, "strip", z.ZodTypeAny, { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: boolean | null }, { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: boolean | null }> ; type: z.ZodLiteral<"function"> }, "strip", z.ZodTypeAny, { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: boolean | null } ; type: "function" }, { function: { description?: string ; name: string ; parameters?: Record<string, unknown> ; strict?: boolean | null } ; type: "function" }>