Skip to content

Fix tool schema compatibility with OpenAI models#845

Closed
edcdavid wants to merge 1 commit intocontainers:mainfrom
edcdavid:clean-upstream
Closed

Fix tool schema compatibility with OpenAI models#845
edcdavid wants to merge 1 commit intocontainers:mainfrom
edcdavid:clean-upstream

Conversation

@edcdavid
Copy link

OpenAI models require the "properties" field to be present in the JSON schema for tool input, even when a tool takes no parameters. Add an empty properties map to the configuration_contexts_list and targets_list tool schemas to ensure compatibility.

Made-with: Cursor

…adata

Introduce a clean_metadata boolean parameter on resources_get and
resources_list that strips managedFields, resourceVersion, uid,
generation, and the last-applied-configuration annotation from output.
This reduces token consumption and lets LLMs focus on the
diagnostically relevant spec/status fields.

Refactor MarshalYaml to accept functional options, replacing the
previous hard-coded SetManagedFields(nil) with an opt-in
WithCleanMetadata() option that performs a more thorough cleanup.

Assisted by: Cursor
@edcdavid edcdavid closed this Feb 27, 2026
@manusa manusa added invalid This doesn't seem right and removed invalid This doesn't seem right labels Feb 28, 2026
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