【Bug】StudioAssist échoue avec Alibaba Cloud DashScope même si l'API fonctionne dans Postman (KS11)

Base Url: https://dashscope.aliyuncs.com/compatible-mode/v1

Model: qwen-turbo

1 Like

The issue is that Katalon StudioAssist’s “OpenAI-compatible provider” option makes API calls in a specific way that may conflict with DashScope’s endpoint. The most common culprits are:

  1. Trailing slash on the Base URL — Katalon may append /chat/completions to your base URL, which breaks if there’s already a trailing slash or path mismatch.

  2. max_completion_tokens vs max_tokens — Newer OpenAI SDK formats use max_completion_tokens, but DashScope still expects max_tokens.

  3. Streaming vs non-streaming — Katalon StudioAssist may send requests expecting streaming responses, which DashScope handles differently.

  4. Region endpoint mismatch

possible solution
1)In your screenshot, the Base URL is:

https://dashscope.aliyuncs.com/compatible-mode/v1

Make sure there is no trailing slash. Katalon appends the path automatically. This alone fixes the issue for many users.

Also — if you are outside mainland China, switch to the international endpoint:

https://dashscope-intl.aliyuncs.com/compatible-mode/v1

2}
Your screenshot shows max_completion_tokens: 120000 — this is extremely high. DashScope’s qwen-turbo has a much lower output token limit.

try reducing it to 4096.

3)Verify the API Key Header Format.
DashScope expects the API key as a Bearer token in the Authorization header.

  1. Try qwen-turbo alternatives, go for plus or max

@pixel10m28 Please let me know if my suggestions worked for you or not?

I made the revisions based on your suggestions, saved the changes, and restarted. However, StudioAssist still failed on Alibaba Cloud DashScope.

Can you post the screenshot of the recent error, I want to look into where it is getting stuck.

Problem Analysis

You’re experiencing a configuration issue where StudioAssist fails to connect to Alibaba Cloud DashScope’s OpenAI-compatible API endpoint, even though the same API works correctly in Postman. This is a known issue documented in the Katalon community forum.

Your Configuration:

  • Base URL: https://dashscope.aliyuncs.com/compatible-mode/v1
  • Model: qwen-turbo
  • API key header: Authorization

The root cause is URL path formatting incompatibility between how Katalon StudioAssist constructs API calls and how DashScope’s endpoint expects them.


Root Cause & Solution

The Issue: Trailing Slash & Path Appending

According to the Katalon community forum discussion on this exact bug, Katalon StudioAssist’s “OpenAI-compatible provider” option automatically appends /chat/completions to your base URL. This creates a conflict:

  • Your Base URL: https://dashscope.aliyuncs.com/compatible-mode/v1
  • What Katalon sends: https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
  • What DashScope expects: https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions (correct) OR issues with trailing slashes

Solution: Correct Base URL Format

Remove the trailing /v1 from your base URL. Configure it as:

https://dashscope.aliyuncs.com/compatible-mode

This allows Katalon to properly append /v1/chat/completions to form the correct endpoint.


Configuration Steps

  1. Open Katalon StudioPreferencesAI configurations

  2. Select “OpenAI-Compatible Provider”

  3. Configure the following:

    • Base URL: https://dashscope.aliyuncs.com/compatible-mode (without /v1)
    • API key: Your DashScope API key
    • API key header name: Authorization
    • Model: qwen-turbo (or your preferred Qwen model)
    • Max completion token: 16000 (default)
  4. Click Apply and test the connection


Key Considerations

DashScope OpenAI Compatibility

According to Alibaba Cloud’s official documentation, DashScope provides full OpenAI-compatible interface support for Qwen models. The qwen-turbo model is fully compatible with OpenAI’s chat completion API format, so the issue is purely configuration-related.

Why Postman Works

In Postman, you likely explicitly specify the full endpoint path (/chat/completions), whereas Katalon automatically appends this path. This is why the same API works in Postman but fails in StudioAssist.

Verify in Postman First

Before applying the fix, confirm your Postman request uses:

  • URL: https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
  • Header: Authorization: Bearer YOUR_API_KEY
  • Body: Standard OpenAI chat completion format

Troubleshooting Checklist

If the issue persists after correcting the base URL:

  1. :white_check_mark: Verify API Key: Ensure your DashScope API key is valid and has active quota
  2. :white_check_mark: Check Response Format: DashScope’s response should match OpenAI’s format exactly
  3. :white_check_mark: Test Model Name: Confirm qwen-turbo is available in your DashScope account
  4. :white_check_mark: Review Logs: Check Katalon Studio’s logs for detailed error messages
  5. :white_check_mark: Token Limits: Adjust Max completion token if you receive token limit errors

References