{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigfa44hdboamenjwpaxmysh4vvn544gv345brjkddcg5qxkqmix6e",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mgerftgit3f2"
  },
  "path": "/t/responses-api-returns-500-when-combining-tool-search-web-search-deferred-function-tool-named-web/1375850#post_1",
  "publishedAt": "2026-03-06T06:05:45.000Z",
  "site": "https://community.openai.com",
  "textContent": "Hi again\n\nWe’ve noticed an issue when using 5.4. The Responses API returns a 500 Internal Server Error when a request includes all three of:\n\n  1. `tool_search` (client-mode)\n  2. `web_search` (built-in)\n  3. A `function` tool with `defer_loading: true` named `\"web\"`\n\n\n\nRenaming the function tool to anything other than `\"web\"` (e.g. `\"web_browsing\"`) resolves the issue (our current workaround!). The collision appears to be between the function tool name `\"web\"` and the `web_search` built-in tool’s internal namespace.\n\n## \n\nReproduction Steps\n\nTested with `gpt-5.4` via the OpenAI Ruby gem (`ruby-openai` v8.3.0). The bug is deterministic.\n\n\n    require \"openai\"\n    client = OpenAI::Client.new(access_token: ENV[\"OPENAI_API_KEY\"])\n\n    # Client-mode tool_search (required when using defer_loading)\n    tool_search = {\n      type: \"tool_search\",\n      execution: \"client\",\n      description: \"Search for and load tools needed for the current task.\",\n      parameters: {\n        type: \"object\",\n        properties: { goal: { type: \"string\" } },\n        required: [\"goal\"],\n        additionalProperties: false\n      }\n    }\n\n    web_search = { type: \"web_search\" }\n\n    # A deferred function tool named \"web\" — this name causes the collision\n    web_tool = {\n      type: \"function\",\n      name: \"web\",\n      description: \"Browse the web to find information\",\n      parameters: {\n        type: \"object\",\n        properties: { url: { type: \"string\" } },\n        required: [\"url\"]\n      },\n      defer_loading: true\n    }\n\n    regular_tools = %w[get_time save_note send_message].map do |name|\n      {\n        type: \"function\",\n        name: name,\n        description: \"Perform #{name.tr('_', ' ')} operation\",\n        parameters: { type: \"object\", properties: {} }\n      }\n    end\n\n    # This returns 500:\n    response = client.responses.create(parameters: {\n      model: \"gpt-5.4\",\n      input: [{ role: \"user\", content: \"Hello\" }],\n      tools: regular_tools + [tool_search, web_tool, web_search],\n      tool_choice: \"auto\",\n      store: false\n    })\n\n\n## Isolation Matrix\n\n`tool_search` | Deferred `\"web\"` | `web_search` | Result\n---|---|---|---\nno | no | yes | **OK**\nyes | yes | no | **OK**\nyes | yes | yes | **500 Server Error**\nyes | `\"web_browsing\"` | yes | **OK**\n\nThe 500 requires all three components. Renaming the function tool from `\"web\"` to anything else resolves it, confirming a naming collision rather than a general incompatibility.\n\n## Expected Behaviour\n\nThe API should either:\n\n  1. Accept a function tool named `\"web\"` without conflicting with the `web_search` built-in, or\n  2. Return a 400 validation error explaining the naming conflict\n\n\n\nA 500 Internal Server Error should not occur for a valid tool configuration.\n\n## Environment\n\n  * Model: `gpt-5.4` (also reproducible on `gpt-5.2`)\n  * API: Responses API (`/v1/responses`)\n  * Client: `ruby-openai` gem v8.3.0\n  * Date observed: 2026-03-06\n  * Reproducible: 100% deterministic\n  * Sample failing request ID: `req_7c913ace1827465dab2ff47b02e14585`\n\n\n\nThanks!",
  "title": "Responses API returns 500 when combining `tool_search` + `web_search` + deferred function tool named `\"web\"`"
}