GPT-5: AI_InvalidToolInputError: Invalid input for tool read: Type validation failed. #1161

Closed
opened 2026-02-16 17:29:49 -05:00 by yindo · 2 comments
Owner

Originally created by @adeperio on GitHub (Aug 7, 2025).

Originally assigned to: @thdxr on GitHub.

Getting this when trying to use GPT-5:

Read

Tool execution aborted

GPT-5: AI_InvalidToolInputError: Invalid input for tool read: Type validation failed.

Originally created by @adeperio on GitHub (Aug 7, 2025). Originally assigned to: @thdxr on GitHub. Getting this when trying to use GPT-5: Read Tool execution aborted GPT-5: AI_InvalidToolInputError: Invalid input for tool read: Type validation failed.
yindo closed this issue 2026-02-16 17:29:49 -05:00
Author
Owner

@pegasora commented on GitHub (Aug 12, 2025):

👍 +1

i am getting the same issues when trying to run gpt-oss:20b locally via ollama.

conversation:

create a file named test.txt in my current directory
dawsonb (01:41 PM)


We need to create a file named test.txt in current directory.
Build gpt-oss:20b (01:41 PM)


Write

The arguments provided to the tool are invalid: Invalid input for tool write: Type
validation failed: Value: {"content":"This is a test file.","path":"test.txt"}.
Error message: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"filePath"
],
"message": "Required"


Plan

[]

Sure thing—just let me know what you’d like me to work on next!
Build gpt-oss:20b (01:41 PM)


Not sure what the issue is, it seems to fail on all tool calls I have tried. Would love some guidance! :)

@pegasora commented on GitHub (Aug 12, 2025): 👍 +1 i am getting the same issues when trying to run gpt-oss:20b locally via ollama. conversation: ============================= create a file named test.txt in my current directory dawsonb (01:41 PM) ______________________________________ We need to create a file named test.txt in current directory. Build gpt-oss:20b (01:41 PM) __________________________________________________ Write The arguments provided to the tool are invalid: Invalid input for tool write: Type validation failed: Value: {"content":"This is a test file.","path":"test.txt"}. Error message: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "filePath" ], "message": "Required" _________________________________________________ Plan [] Sure thing—just let me know what you’d like me to work on next! Build gpt-oss:20b (01:41 PM) _________________________________________________ Not sure what the issue is, it seems to fail on all tool calls I have tried. Would love some guidance! :)
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1161