Reasoning
LivRouter API supports reasoning models such as glm-5.3. Reasoning behavior and parameters vary by model, so check the current catalog before relying on a specific option.
from openai import OpenAI client = OpenAI( base_url="https://api.livrouter.com/v1") prompt = """Write a bash script that takes a matrix represented as a string with format '[1,2],[3,4],[5,6]' and prints the transpose in the same format.""" response = client.responses.create( model="glm-5.3", reasoning={"effort": "medium"}, input=[ { "role": "user", "content": prompt } ]) print(response.output_text)In the example above, the reasoning effort parameter guides the model on how many reasoning tokens to generate before creating a response to the prompt.
Specify low, medium, or high for this parameter, where low favors speed and economical token usage, and high favors more complete reasoning. The default value is medium, which is a balance between speed and reasoning accuracy.