FAQ¶
This document collects frequently asked questions and answers from users.
General¶
API Related¶
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-cs-al.naci-tech.com/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)
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-cs-al.naci-tech.com/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)