refactor: ponytail audit

This commit is contained in:
Amruth Pillai
2026-07-27 20:26:16 +02:00
parent bb1fb3a7d6
commit 9110e86997
157 changed files with 1082 additions and 2177 deletions
+1 -3
View File
@@ -80,9 +80,7 @@ export function supportsOpenAIWebSearch(model: string) {
if (OPENAI_WEB_SEARCH_RESPONSES_MODEL_IDS.has(normalized)) return true;
return Array.from(OPENAI_WEB_SEARCH_RESPONSES_MODEL_IDS).some((modelId) =>
isDateSnapshotForModel(normalized, modelId),
);
return [...OPENAI_WEB_SEARCH_RESPONSES_MODEL_IDS].some((modelId) => isDateSnapshotForModel(normalized, modelId));
}
export function supportsProviderNativeWebSearch(provider: AiProviderCapabilityInput) {
+1 -1
View File
@@ -15,7 +15,7 @@ afterEach(() => {
function stubOpenAICompatibleResponse(response?: { content?: string; finishReason?: string }) {
let requestBody: unknown;
const fetchMock = vi.fn(async (_input: unknown, init?: { body?: unknown }) => {
const fetchMock = vi.fn((_input: unknown, init?: { body?: unknown }) => {
const body = JSON.parse(String(init?.body ?? "{}")) as { max_tokens?: number };
requestBody = body;
const hasEnoughOutputTokens = (body.max_tokens ?? 0) >= 128;
+1 -1
View File
@@ -361,7 +361,7 @@ async function chat(input: ChatInput) {
"Return one or more cohesive resume change proposals. Each proposal must include a title, optional summary, and valid JSON Patch operations against the current resume data. The tool validates but does not apply changes.",
inputSchema: resumePatchProposalToolInputSchema,
outputSchema: resumePatchProposalToolOutputSchema,
execute: async (toolInput) => {
execute: (toolInput) => {
const proposals = normalizeResumePatchProposals(toolInput, input.resumeUpdatedAt);
for (const proposal of proposals) {