8000 Properly define empty parameter schema in `vectorcode_ls` by Davidyz · Pull Request #252 · Davidyz/VectorCode · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Davidyz
Copy link
Owner
@Davidyz Davidyz commented Jul 23, 2025

Fix #251

@codecov
Copy link
codecov bot commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.77%. Comparing base (31694ae) to head (e1c1891).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #252   +/-   ##
=======================================
  Coverage   99.77%   99.77%           
=======================================
  Files          24       24           
  Lines        1767     1767           
=======================================
  Hits         1763     1763           
  Misses          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Davidyz Davidyz force-pushed the fix/codecompanion_tool_empty_params branch 2 times, most recently from 6d66492 to ae1f0e6 Compare July 28, 2025 10:12
@Davidyz Davidyz force-pushed the fix/codecompanion_tool_empty_params branch from ae1f0e6 to 8357afb Compare July 29, 2025 13:29
@e2r2fx
Copy link
e2r2fx commented Jul 31, 2025

@Davidyz I's actually struggling with this and to get ls_tool to play nice with the Openai API I needed to do:

        parameters = {
          type = "object",
          properties = vim.empty_dict(),
          required = {},
          additionalProperties = false,
        },

Else I get this error:

   Error  04:19:23 PM notify.error CodeCompanion [ERROR] 2025-07-31 16:19:23
Error: {"error":{"message":"Provider returned error","code":400,"metadata":{"raw":"{\n  \"error\": {\n    \"message\": \"Invalid schema for function 'vectorcode_ls': In context=(), object schema missing properties.\",\n    \"type\": \"invalid_request_error\",\n    \"param\": \"tools[0].parameters\",\n    \"code\": \"invalid_function_parameters\"\n  }\n}","provider_name":"OpenAI"}},"user_id":"user_30QHKPagVa9FChY2hm9QEVFRkRJ"}

Do keep in mind this is through Openrouter

@Davidyz
Copy link
Owner Author
Davidyz commented Aug 1, 2025

Thanks for the patch. I was playing around with qwen3-coder 30b using llama-cpp and was able to reproduce the error. Your suggested fix solved the issue for llama-cpp, too. Thanks again!

@Davidyz Davidyz merged commit fce1298 into main Aug 1, 2025
17 checks passed
@Davidyz Davidyz changed the title Add empty parameters to ls_tool Properly define empty parameter schema in vectorcode_ls Aug 1, 2025
@Davidyz Davidyz deleted the fix/codecompanion_tool_empty_params branch August 1, 2025 07:53
@Davidyz
Copy link
Owner Author
Davidyz commented Aug 1, 2025

@olimorris do you think we should upstream this into tool_transformers.lua in codecompanion.nvim?

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

Labels

bug Something isn't working fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Error in tool_transformers.lua when use vectorise ls in codecomanion.nvim

3 participants

0