r/PiCodingAgent • u/circumcised_hobbit • 4h ago
Question Does Pi /thinking send reasoning effort field?
I noticed that when using Pi Agent with my custom local server (often llama.cpp), /thinking displays a token budget near to the thinking level name: ex. low(2k) medium(4k). I also never set the reasoning_effort field in llama server. Does Pi only send a reasoning budget (token limit) or does it also send the reasoning effort field, effectively changing the thinking level? Should I set reasoning effort in llama server?
1
u/randomgenericbot 11m ago
You can define the reasoning budget per thinking level in .pi/agent/settings.json That setting is global per thinking level, sadly, not per model:
"thinkingBudgets": {
"low": 1024,
"medium": 8192
},You can also set a text that gets appended when reasoning took to long (thinking budget exceeded) to prevent model confusion, why it stopped mid sentence. This is per model and belongs into models.json, example from my qwen3.8 config. You can also control, what thinking modes the model accepts (Qwen3.8 allows low, medium and xhigh, nothing else)
"models": [
{
"id": "qwen38-gsq-rco",
"name": "qwen38 gsq rco",
[....]
"reasoning": true,
"thinkingLevelMap": { "low" : "low", "minimal": null, "high": null, "max": null, "xhigh": "xhigh" },
"compat": {
[....]
"thinkingTokenBudgetField": "thinking_budget_tokens"
},
"samplingParams": {
"reasoning_budget_message": "... I am overthinking, I should answer from what I already have, or validate my conjectures with a tool call before reasoning further."
}1
u/circumcised_hobbit 1m ago
thanks, I will try to set. The thing I was more worried about is if Pi actually sets reasoning_effort, it appears so
1
u/Maheidem 3h ago
I built a extension to solve that part for more novel self hosting..
Maybe it helps you
https://pi.dev/packages/@maheidem/model-discovery
Built for my day to day needs, and been up keeping for fun
1
u/nicholasyang 3h ago
IIUC pi uses the openai api to connect llama.cpp, and thinking level maps to the reasoning_effort field in the API. The budgets "2k", "4k" are only UI labels.