// (c) Which sampling / control params are accepted vs rejected per model, with exact error messages. import { client, attempt, save, PROBE_MODELS } from "./lib"; const base = { input: "Reply with exactly one word: pong", max_output_tokens: 32 }; const CASES: Record = { "temperature=0.5": { temperature: 0.5 }, "top_p=0.9": { top_p: 0.9 }, "frequency_penalty=0.5": { frequency_penalty: 0.5 }, "presence_penalty=0.5": { presence_penalty: 0.5 }, "seed=42": { seed: 42 }, "stop=['x']": { stop: ["x"] }, "logprobs(top_logprobs=2+include)": { top_logprobs: 2, include: ["message.output_text.logprobs"] }, "reasoning.effort=none": { reasoning: { effort: "none" } }, "reasoning.effort=minimal": { reasoning: { effort: "minimal" } }, "reasoning.effort=low": { reasoning: { effort: "low" } }, "reasoning.effort=medium": { reasoning: { effort: "medium" } }, "reasoning.effort=high": { reasoning: { effort: "high" } }, "reasoning.effort=xhigh": { reasoning: { effort: "xhigh" } }, "reasoning.effort=max": { reasoning: { effort: "max" } }, "reasoning.summary=auto": { reasoning: { summary: "auto" } }, "text.verbosity=low": { text: { verbosity: "low" } }, "store=false+include=reasoning.encrypted_content": { store: false, include: ["reasoning.encrypted_content"] }, "prompt_cache_key": { prompt_cache_key: "polyllm-probe-v1" }, "max_output_tokens=5": { max_output_tokens: 5 }, "truncation=auto": { truncation: "auto" }, "temperature=0.5+reasoning.effort=none": { temperature: 0.5, reasoning: { effort: "none" } }, }; const out: any[] = []; for (const model of PROBE_MODELS) { for (const [label, extra] of Object.entries(CASES)) { out.push(await attempt(`${model} :: ${label}`, async () => { const r: any = await client.responses.create({ model, ...base, ...extra } as any); return { status: r.status, incomplete: r.incomplete_details ?? null, text: (r.output_text ?? "").slice(0, 60), usage: r.usage, echoed: { temperature: r.temperature, top_p: r.top_p, reasoning: r.reasoning, text: r.text, truncation: r.truncation }, output_types: r.output.map((o: any) => o.type), has_encrypted: r.output.some((o: any) => o.type === "reasoning" && o.encrypted_content), logprobs: r.output.find((o: any) => o.type === "message")?.content?.[0]?.logprobs?.length ?? null }; })); } } save("04-params", out);