fix: handle missing required params for OpenAI/GPT-5 function calling (Skill tool)#482
Open
pollmap wants to merge 1 commit intoGitlawb:mainfrom
Open
fix: handle missing required params for OpenAI/GPT-5 function calling (Skill tool)#482pollmap wants to merge 1 commit intoGitlawb:mainfrom
pollmap wants to merge 1 commit intoGitlawb:mainfrom
Conversation
When using OpenClaude with GPT-5/Codex backends, slash commands such as
/skill-name trigger a Skill tool call without the required `skill` parameter,
resulting in: "The required parameter `skill` is missing".
Root cause: OpenAI function calling relies heavily on schema descriptions to
infer parameter values. The previous description did not make the
slash-to-parameter mapping explicit, causing GPT-5 to call Skill({}) or
Skill({skill: undefined}) instead of Skill({skill: "skill-name"}).
Changes:
- inputSchema: expand `skill` description to explicitly document that the
leading slash must be stripped (/commit → skill: "commit") with concrete
input/output examples for GPT-style function calling
- validateInput: add a null/undefined guard before skill.trim() to produce
an actionable error message when non-Claude runtimes omit the parameter
- prompt.ts: append a short IMPORTANT block for OpenAI/GPT function calling
that reinforces the required parameter contract and slash-stripping rule
Affected provider: OpenAI-compatible / Codex backends only.
Claude (Anthropic) behaviour is unchanged.
kevincodex1
approved these changes
Apr 7, 2026
Contributor
kevincodex1
left a comment
There was a problem hiding this comment.
Looks great to me! We just need to make sure this will not affect other models
gnanam1990
requested changes
Apr 7, 2026
Collaborator
gnanam1990
left a comment
There was a problem hiding this comment.
Thanks for the PR and for digging into this. The direction looks right, and the prompt/schema improvements seem helpful for GPT-style function calling. I do have one blocking concern before we merge:
- The missing-
skillruntime path still doesn’t appear to be fully handled.tool.inputSchema.safeParse(input)runs beforevalidateInput(), so calls likeSkill({})orSkill({ skill: undefined })will still fail in Zod first and never reach the new null/undefined guard. - There isn’t a regression test covering that exact missing-parameter path, so it’s hard to verify the reported issue is actually fixed rather than just better-guided.
Could you take another look and either adjust the schema/validation flow for that case, or narrow the PR description to “improve model guidance” and add a regression test for the actual failure mode? Happy to discuss if helpful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using OpenClaude with GPT-5/Codex backends, slash commands such as
/commitor/review-prtrigger a Skill tool call without the requiredskillparameter:```
InputValidationError: Skill failed due to the following issue:
The required parameter
skillis missing```
Root Cause
OpenAI function calling relies heavily on the JSON schema `description` field to infer parameter values. The previous `skill` description did not explicitly document:
As a result, GPT-5 calls `Skill({})` or `Skill({skill: undefined})` instead of `Skill({skill: "commit"})`.
Changes
Affected Provider
OpenAI-compatible / Codex backends only. Claude (Anthropic) behaviour is unchanged.
Tested With
OpenClaude v0.1.8 + Codex Spark (`https://chatgpt.com/backend-api/codex\`) via ChatGPT Pro OAuth