@moxxy/plugin-provider-openai-codex 0.41.2 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/translate.ts CHANGED
@@ -39,7 +39,9 @@ export interface ResponsesBody {
39
39
  input: ResponsesInputItem[];
40
40
  tools?: ResponsesTool[];
41
41
  parallel_tool_calls?: boolean;
42
- reasoning?: { effort?: 'low' | 'medium' | 'high'; summary?: 'auto' | 'detailed' };
42
+ reasoning?: { effort?: 'low' | 'medium' | 'high' | 'xhigh'; summary?: 'auto' | 'detailed' };
43
+ /** `priority` is OpenAI's fast mode. */
44
+ service_tier?: 'priority';
43
45
  store?: boolean;
44
46
  stream: true;
45
47
  prompt_cache_key?: string;
@@ -166,7 +168,7 @@ export function toResponsesTools(tools: ReadonlyArray<ToolDef>): ResponsesFuncti
166
168
 
167
169
  export interface BuildBodyOptions {
168
170
  readonly sessionHint?: string;
169
- readonly reasoningEffort?: 'low' | 'medium' | 'high';
171
+ readonly reasoningEffort?: 'low' | 'medium' | 'high' | 'xhigh';
170
172
  readonly hostedTools?: ReadonlyArray<HostedTool>;
171
173
  }
172
174
 
@@ -236,6 +238,7 @@ export function toResponsesBody(req: ProviderRequest, opts: BuildBodyOptions = {
236
238
  }
237
239
  if (tools.length > 0) body.tools = tools;
238
240
  if (opts.sessionHint) body.prompt_cache_key = opts.sessionHint;
241
+ if (req.fast) body.service_tier = 'priority';
239
242
  if (req.maxTokens !== undefined) noteMaxTokensUnsupported();
240
243
  if (req.temperature !== undefined) noteTemperatureUnsupported();
241
244
  return body;