Skip to content

fix: add type field to kv_store value parameter for llama.cpp compatibility#244

Open
mlzy wants to merge 1 commit intoRightNow-AI:mainfrom
mlzy:main
Open

fix: add type field to kv_store value parameter for llama.cpp compatibility#244
mlzy wants to merge 1 commit intoRightNow-AI:mainfrom
mlzy:main

Conversation

@mlzy
Copy link

@mlzy mlzy commented Mar 3, 2026

Summary

  • Add "type": "object" to the value parameter in kv_store tool's JSON schema definition

Fixes #236

Problem

llama.cpp's OpenAI-compatible backend fails when encountering tool parameters without an explicit type field. The error:
JSON schema conversion failed: Unrecognized schema: {"description":"The JSON value to store (any type)"}

Solution

Add "type": "object" to the value parameter schema, making it compatible with llama.cpp and other backends that require explicit typing.

The value property was missing a type field in its JSON schema definition.
Added "type": "object" to properly declare the value type.
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.

llama.cpp OpenAI-compatible backend fails with OpenFang memory_store/memory_recall tools (JSON schema “any type” not supported)

1 participant