Skip to content

bug: 通义千问 Qwen API 报错 'developer is not one of [...roless...]' #184

Description

@Sun-sunshine06

问题描述

使用通义千问(Qwen)模型时,生成失败,API 返回 400 错误:

根因

open-codesign 在构造消息列表时,可能会传入 角色(这来自 Claude Code / Anthropic 提示格式),但通义千问 DashScope API 不接受 作为有效角色,只接受:

需要修复

在通义千问提供者适配层,将 角色重映射为 角色。

相关 issue

相关的第三方 API 兼容性问题:#167

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providerspackages/providers (pi-ai adapter, model calls)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