Merge pull request #3028 from code-yeongyu/fix/issue-2923-gpt41mini-toolcall

fix(models): mark gpt-4.1-mini and gpt-4.1-nano as supporting tool calls
This commit is contained in:
YeonGyu-Kim
2026-04-02 15:46:09 +09:00
committed by GitHub
2 changed files with 36 additions and 2 deletions
@@ -12113,7 +12113,7 @@
"family": "gpt-nano",
"reasoning": false,
"temperature": true,
"toolCall": false,
"toolCall": true,
"modalities": {
"input": [
"text",
@@ -12274,7 +12274,7 @@
"family": "gpt-mini",
"reasoning": false,
"temperature": true,
"toolCall": false,
"toolCall": true,
"modalities": {
"input": [
"text",
@@ -0,0 +1,34 @@
import { describe, expect, test } from "bun:test"
import { getBundledModelCapabilitiesSnapshot, getModelCapabilities } from "./model-capabilities"
describe("bundled model capabilities snapshot", () => {
test("keeps GPT-4.1 OpenAI variants marked as supporting tool calls", () => {
// given
const bundledSnapshot = getBundledModelCapabilitiesSnapshot()
const modelIDs = [
"openai/gpt-4.1",
"openai/gpt-4.1-mini",
"openai/gpt-4.1-nano",
]
// when
const results = modelIDs.map((modelID) =>
getModelCapabilities({
providerID: "openai",
modelID,
bundledSnapshot,
}),
)
// then
for (const result of results) {
expect(result.toolCall).toBe(true)
expect(result.diagnostics).toMatchObject({
resolutionMode: "snapshot-backed",
snapshot: { source: "bundled-snapshot" },
toolCall: { source: "bundled-snapshot" },
})
}
})
})