Skip to content

[Closed] [Feature]: Decouple request body format from provider type for custom endpoints #14169

@09cy8d9wa1

Description

@09cy8d9wa1

Issue Checklist

  • I understand that issues are for reporting problems and requesting features, not for off-topic comments, and I will provide as much detail as possible to help resolve the issue.
  • I have checked the pinned issues and searched through the existing open issues, closed issues, and discussions and did not find a similar suggestion.
  • I have provided a short and descriptive title so that developers can quickly understand the issue when browsing the issue list, rather than vague titles like "A suggestion" or "Stuck."
  • The latest version of Cherry Studio does not include the feature I am suggesting.

Platform

Windows

Version

v1.9.0-rc.0

Is your feature request related to an existing issue?

CherryStudio currently locks the request body format to the provider type. If a provider is set to Anthropic, it always sends Anthropic-format requests to /messages. If set to OpenAI-compatible, it always sends OpenAI format. This makes it impossible to use Claude models's proprietary features through gateways or relay services that only expose /v1/chat/completions, which is a very common setup.

Desired Solution

Allow the request body format to be configured independently from the provider type. A user should be able to point CherryStudio at any custom gateway and choose which format to send, regardless of how the provider is registered.

Alternative Solutions

Asking the gateway provider to add a missing endpoint, or running a local reverse proxy. Both workarounds place the burden on the user side.

Additional Information

I am not a developer and have not reviewed CherryStudio's source code, so I cannot provide implementation details. However I have confirmed(Tested from other LLMAPI FrontEnd's configuration) this is technically feasible at the SDK level based on prior research. This affects a wide range of common self-hosted and commercial gateway setups including LiteLLM, One-API, New-API, and others provider, making it a general need rather than an edge case.and make user save them time(for deploy Linux Server/Docker/..... it unstable and hardcore for most people)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions