Skip to content

SmartGuide + DeepSeek anthropic mode fails with Invalid schema for send_file/write tool definitions #1071

@UssCuriosity

Description

@UssCuriosity

Version

latest

System Information

macOS 26.4.1 arm64

Category

Protocol

Scenario

I was using SmartGuide with a DeepSeek provider configured in Anthropic API style when the agent tried to register or use file-related tools.

Environment:

  • Provider: DeepSeek
  • API base: https://api.deepseek.com/anthropic
  • API style: Anthropic
  • SmartGuide route/model: deepseek-v4-flash
  • Local endpoint: http://localhost:12580/tingly/_smart_guide/v1/messages

Expected:
SmartGuide requests should either transform tool definitions into a DeepSeek-compatible schema, or gracefully disable unsupported tools on this path.

Actual:
Tingly returns 500 to the SmartGuide caller, wrapping a DeepSeek 400. The upstream error says the tool schema is invalid for functions such as send_file and write.

This looks related to prior DeepSeek compatibility work such as #831, #875, #1067, and the broader tracking issue #1042, but SmartGuide tool definitions still appear to hit an uncovered schema-translation path.

Image

Steps to Reproduce

  1. Add a DeepSeek provider using Anthropic API style with base URL https://api.deepseek.com/anthropic.
  2. Create or start a SmartGuide bot routed to that DeepSeek provider.
  3. Send a message that causes SmartGuide to register or consider file-related tools such as send_file or write-related tools such as write.
  4. Observe the request fail before normal completion.

Logs / Error Output

time="2026-05-29T09:56:12+08:00" level=error msg="Failed to get agent response" error="iteration 0: SDK call failed: POST \"http://localhost:12580/tingly/_smart_guide/v1/messages\": 500 Internal Server Error {\"error\":{\"message\":\"Failed to create streaming request: forward non-stream failed: POST \\\"https://api.deepseek.com/anthropic/v1/messages\\\": 400 Bad Request {\\\"error\\\":{\\\"message\\\":\\\"Invalid schema for function 'send_file': [\\\\\\\"file_path\\\\\\\"] is not of types \\\\\\\"boolean\\\\\\\", \\\\\\\"object\\\\\\\"\\\",\\\"type\\\":\\\"invalid_request_error\\\",\\\"param\\\":null,\\\"code\\\":\\\"invalid_request_error\\\"}}\",\"type\":\"api_error\"}}"

time="2026-05-29T09:46:52+08:00" level=error msg="Failed to get agent response" error="iteration 0: SDK call failed: POST \"http://localhost:12580/tingly/_smart_guide/v1/messages\": 500 Internal Server Error {\"error\":{\"message\":\"Failed to create streaming request: forward non-stream failed: POST \\\"https://api.deepseek.com/anthropic/v1/messages\\\": 400 Bad Request {\\\"error\\\":{\\\"message\\\":\\\"Invalid schema for function 'write': [\\\\\\\"path\\\\\\\",\\\\\\\"content\\\\\\\"] is not of types \\\\\\\"boolean\\\\\\\", \\\\\\\"object\\\\\\\"\\\",\\\"type\\\":\\\"invalid_request_error\\\",\\\"param\\\":null,\\\"code\\\":\\\"invalid_request_error\\\"}}\",\"type\":\"api_error\"}}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions