feat. Custom Thinking effort #6

Closed
opened 2026-04-04 16:10:27 +02:00 by space · 7 comments
Owner

When sending an event to openclaw we want to be able to configure the "thinking" prop with a env variable like AGENT_THINK_EFFORT which is limited to "low" "medium" and "high" or "xhigh" if there is an "openai" in the OPENCLAW_MODEL variable

When sending an event to openclaw we want to be able to configure the "thinking" prop with a env variable like AGENT_THINK_EFFORT which is limited to "low" "medium" and "high" or "xhigh" if there is an "openai" in the OPENCLAW_MODEL variable
Author
Owner

and we should also support "thinking":"off"

and we should also support "thinking":"off"
Author
Owner

@luna can you sum this up in a little markdown format?

@luna can you sum this up in a little markdown format?
Collaborator

Summary: Custom Thinking Effort Feature

Goal: Allow configuring the "thinking" property for OpenClaw events via environment variables.

Proposed Changes:

  • Introduce AGENT_THINK_EFFORT environment variable.
  • Supported values: off, low, medium, high.
  • Special Case: Support xhigh if OPENCLAW_MODEL contains "openai".
### Summary: Custom Thinking Effort Feature **Goal:** Allow configuring the "thinking" property for OpenClaw events via environment variables. **Proposed Changes:** - Introduce `AGENT_THINK_EFFORT` environment variable. - Supported values: `off`, `low`, `medium`, `high`. - Special Case: Support `xhigh` if `OPENCLAW_MODEL` contains "openai".
Author
Owner

@luna what files would be modified? With docs and stuff

@luna what files would be modified? With docs and stuff
Collaborator

Only 2 files would need changes:

1. main.py

  • Add AGENT_THINK_EFFORT to required_data list
  • Read it like other env vars
  • Replace hardcoded "thinking": "low" with the value from env var (or default to "low")

2. README.md

  • Add AGENT_THINK_EFFORT to the Environment Variables table with description

No other changes needed — the webhook handler structure stays the same.

Only 2 files would need changes: ### 1. `main.py` - Add `AGENT_THINK_EFFORT` to `required_data` list - Read it like other env vars - Replace hardcoded `"thinking": "low"` with the value from env var (or default to "low") ### 2. `README.md` - Add `AGENT_THINK_EFFORT` to the Environment Variables table with description No other changes needed — the webhook handler structure stays the same.
Author
Owner

@luna can you start working on this? Also the effort would not be required, its just gonna be "low" by default

@luna can you start working on this? Also the effort would not be required, its just gonna be "low" by default
Collaborator

I have implemented the custom thinking effort feature. You can now use the OPENCLAW_THINKING environment variable to set the desired effort level (defaults to low).

I have opened PR #7 for this change.

I have implemented the custom thinking effort feature. You can now use the `OPENCLAW_THINKING` environment variable to set the desired effort level (defaults to `low`). I have opened PR #7 for this change.
space closed this issue 2026-04-04 16:57:48 +02:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: space/assign-me-openclaw#6