Skip to content

FAQ

This document collects frequently asked questions and answers from users.

General

What if reasoning_effort doesn't work when using LiteLLM to call this site's API?

When using the LiteLLM platform to call this site's API, if reasoning_effort at the top level does not enable thinking mode, try passing it via extra_body instead, which merges it into the request body correctly.

Method 1: reasoning_effort at top level (may not be forwarded correctly by LiteLLM)

from litellm import completion

# Top-level param may not be correctly forwarded to this site's API
response = completion(
    model="openai/gpt-4o",
    api_base="https://api.agtcloud.ai/v1",
    api_key="your-api-key",
    messages=[{"role": "user", "content": "Which is greater, 9.11 or 9.8? Please analyze."}],
    reasoning_effort="medium",  # Top-level param may not work
)
print(response.choices[0].message.content)

How to record request-id so we can trace logs?

If you run into request failures, abnormal responses, or any issue that needs troubleshooting, please record the request-id from the response headers first. We can use this ID to locate the corresponding logs in the backend and speed up diagnosis.

In most cases, the request-id is returned in the response header as x-oneapi-request-id, for example:

x-oneapi-request-id: 20250312190218573397380LcOJ8kJX

Here is a Python requests example to retrieve it:

import requests

url = "https://api.xxx.com/v1/chat/completions"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
}

data = {
    "model": "xxx",
    "messages": [{"role": "user", "content": "hello"}],
}

resp = requests.post(url, headers=headers, json=data)

# Get request-id from response header x-oneapi-request-id
request_id = resp.headers.get("x-oneapi-request-id")

print("request_id:", request_id)
print("response:", resp.json())

When submitting a ticket/feedback, please include the request-id (and ideally request time, endpoint path, and model name) for faster and more accurate troubleshooting.

You can also open the backend /console/log page and paste the recorded value into the request-id search box to query logs directly.

Method 2: Use extra_body (recommended if Method 1 doesn't work)

from litellm import completion

# Via extra_body, correctly forwarded to this site's API
response = completion(
    model="openai/gpt-4o",
    api_base="https://api.agtcloud.ai/v1",
    api_key="your-api-key",
    messages=[{"role": "user", "content": "Which is greater, 9.11 or 9.8? Please analyze."}],
    extra_body={"reasoning_effort": "medium"},
)
print(response.choices[0].message.content)