mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 21:03:56 +00:00
Add service tier option for OpenAI Responses API (#672)
* add service tier option for OpenAI responses * add serviceTier option for OpenAI Responses requests
This commit is contained in:
parent
7cad705a15
commit
7b79e8ec51
2 changed files with 9 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ function shortHash(str: string): string {
|
|||
export interface OpenAIResponsesOptions extends StreamOptions {
|
||||
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
|
||||
reasoningSummary?: "auto" | "detailed" | "concise" | null;
|
||||
serviceTier?: ResponseCreateParamsStreaming["service_tier"];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -373,6 +374,10 @@ function buildParams(model: Model<"openai-responses">, context: Context, options
|
|||
params.temperature = options?.temperature;
|
||||
}
|
||||
|
||||
if (options?.serviceTier !== undefined) {
|
||||
params.service_tier = options.serviceTier;
|
||||
}
|
||||
|
||||
if (context.tools) {
|
||||
params.tools = convertTools(context.tools);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue