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:
Markus Ylisiurunen 2026-01-13 00:20:18 +02:00 committed by GitHub
parent 7cad705a15
commit 7b79e8ec51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased]
### Added
- Added `serviceTier` option for OpenAI Responses requests ([#672](https://github.com/badlogic/pi-mono/pull/672) by [@markusylisiurunen](https://github.com/markusylisiurunen))
## [0.44.0] - 2026-01-12
## [0.43.0] - 2026-01-11

View file

@ -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);
}