Skip to content

Fix insert-block tool call#275

Merged
dwash96 merged 5 commits intocecli-dev:v0.90.3from
jamwil:fix-insertBlock
Dec 19, 2025
Merged

Fix insert-block tool call#275
dwash96 merged 5 commits intocecli-dev:v0.90.3from
jamwil:fix-insertBlock

Conversation

@jamwil
Copy link
Copy Markdown

@jamwil jamwil commented Dec 18, 2025

The check for mutual exclusivity on the position argument did not handle empty strings.

@jamwil jamwil changed the title Fix insert-block tool call. Fix insert-block tool call Dec 18, 2025
@jamwil jamwil marked this pull request as ready for review December 18, 2025 22:22
@jamwil jamwil marked this pull request as draft December 18, 2025 22:31
@jamwil
Copy link
Copy Markdown
Author

jamwil commented Dec 18, 2025

There are some other similar bugs. Still making edits.

@jamwil jamwil marked this pull request as ready for review December 18, 2025 22:53
@jamwil
Copy link
Copy Markdown
Author

jamwil commented Dec 18, 2025

@dwash96 Does the coder provide the LLM with the docstring from the execute method on the tool? GPT-5.2 takes the schema super literally on InsertBlock and I think the tool manual (if that is the docstring or something else) needs to make it more clear to the LLM that three of the parameters are mutually exclusive.

@dwash96
Copy link
Copy Markdown
Collaborator

dwash96 commented Dec 19, 2025

Hmm it doesn't no, but I feel like these things are JSON schemas at the end of the day so I'll merge this and add the oneOf sub schema property to InsertBlock and ShowNumberedContext:

https://json-schema.org/understanding-json-schema/reference/combining

@dwash96 dwash96 changed the base branch from main to v0.90.3 December 19, 2025 05:40
@dwash96 dwash96 merged commit 71bb11d into cecli-dev:v0.90.3 Dec 19, 2025
8 checks passed
@dwash96 dwash96 mentioned this pull request Dec 19, 2025
@jamwil jamwil deleted the fix-insertBlock branch December 19, 2025 21:11
@jamwil
Copy link
Copy Markdown
Author

jamwil commented Dec 19, 2025

Hmm it doesn't no, but I feel like these things are JSON schemas at the end of the day so I'll merge this and add the oneOf sub schema property to InsertBlock and ShowNumberedContext:

https://json-schema.org/understanding-json-schema/reference/combining

I'm getting an error against openrouter/openai: \"Invalid schema for function 'InsertBlock': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.\"

I guess they only support a sub-set of JSON schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants