Skip to content

Commit 7a2d724

Browse files
Copilot0x4007
andcommitted
Run formatter to fix whitespace and formatting issues
Co-authored-by: 0x4007 <4975670+0x4007@users.noreply.github.com>
1 parent b81fa6e commit 7a2d724

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/openai.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,21 @@ const buildIgnoredWarnings = (record: Record<string, unknown>, usedKeys: Readonl
204204
return Array.from(warnings);
205205
};
206206

207-
type PassthroughToolSchemaKey = "tools" | "tool_choice" | "parallel_tool_calls" | "prompt_cache_key" | "text" | "include";
207+
type PassthroughToolSchemaKey =
208+
| "tools"
209+
| "tool_choice"
210+
| "parallel_tool_calls"
211+
| "prompt_cache_key"
212+
| "text"
213+
| "include";
208214

209215
const normalizeCodexToolChoice = (value: unknown): unknown => {
210216
if (!isRecord(value)) return value;
211217
if (getString(value.type) !== "function") return value;
212218

213219
const topLevelName = getString(value.name);
214220
const fn = isRecord(value.function) ? value.function : null;
215-
221+
216222
// If no function field and no valid top-level name, nothing to normalize
217223
const hasValidTopName = topLevelName && topLevelName.trim();
218224
if (!fn && !hasValidTopName) return value;
@@ -2446,7 +2452,12 @@ export const handleChatCompletions = async (req: Request, usageContext?: UsageCo
24462452
reasoning: reasoningValue,
24472453
instructions,
24482454
});
2449-
const passthroughKeys: PassthroughToolSchemaKey[] = ["tools", "tool_choice", "parallel_tool_calls", "prompt_cache_key"];
2455+
const passthroughKeys: PassthroughToolSchemaKey[] = [
2456+
"tools",
2457+
"tool_choice",
2458+
"parallel_tool_calls",
2459+
"prompt_cache_key",
2460+
];
24502461
applyPassthroughToCodexRequest(codexBody, rawRecord, passthroughKeys);
24512462
codexBody.store = false;
24522463

0 commit comments

Comments
 (0)