name = "Alibaba" env = ["DASHSCOPE_API_KEY"] npm = "@ai-sdk/openai-compatible" # Reasoning HTTP format (accessed 2026-06-25): # OpenAI Chat: POST /compatible-mode/v1/chat/completions; top-level # `enable_thinking` is true or false and `thinking_budget` is an integer token # cap (Qwen3/Qwen3.5/Qwen3.6/Qwen3.7/Qwen3-VL thinking mode and Kimi; # public docs say the default is the model maximum but do not publish bounds). # Responses: POST /compatible-mode/v1/responses; `reasoning.effort` is none, # minimal, low, medium (default), or high; no numeric thinking budget is accepted. # Anthropic: POST /apps/anthropic/v1/messages; `thinking.type` is enabled or # disabled and `thinking.budget_tokens` is an integer used only when enabled. # `reasoning_effort` is high or max only for DeepSeek V4 Pro/Flash. # DashScope text: POST /api/v1/services/aigc/text-generation/generation; put # `enable_thinking` and `thinking_budget` under `parameters`, not at JSON root. # Sources: # https://www.alibabacloud.com/help/en/model-studio/deep-thinking # https://www.alibabacloud.com/help/en/model-studio/compatibility-with-openai-responses-api # https://www.alibabacloud.com/help/en/model-studio/anthropic-api-messages doc = "https://www.alibabacloud.com/help/en/model-studio/models" api = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"