Skip to content

Suggestion: convert null content to empty string for Azure compatibility #448

Description

@HappyLiang12

When using CC Switch to translate Responses API → Chat Completions with Azure OpenAI as the backend, requests with "content": null get rejected by Azure.

Azure strictly requires content to be a string, while the Responses API allows null for tool-call-only messages. Other providers like Alicloud are more lenient and accept null.

Would it make sense for CC Switch to convert null"" during translation? This would improve compatibility with strict providers without breaking lenient ones.

Version: v5.10.4 (Windows x64)

Activity

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

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