Skip to content

fix(skill-scan): forward optional reasoning effort to the model API - #676

Merged
boy-hack merged 1 commit into
Tencent:mainfrom
Patrick-Erichsen:codex/skill-scan-reasoning-effort
Sep 24, 2026
Merged

boy-hack merged 1 commit into
Tencent:mainfrom
Patrick-Erichsen:codex/skill-scan-reasoning-effort

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Summary

aig-skill-scan currently ignores REASONING_EFFORT, so callers cannot request a reasoning level from a compatible model. Read the optional setting and forward a nonblank value as reasoning_effort in the Chat Completions request. Trim surrounding whitespace and omit the parameter when unset or blank, preserving the existing request behavior.

Document the setting in the English and Chinese READMEs. Supported values remain model/provider-dependent; this does not change model defaults or require an SDK upgrade.

Type of change

  • Bug fix
  • Documentation

How was this tested?

  • Regression test first failed on base 1a5ffa3: REASONING_EFFORT=high produced a request without reasoning_effort. It passes after the fix.
  • cd skill-scan && .venv/bin/python -m pytest pytests -q: 84 passed, including configured, whitespace-trimmed, unset, empty, and whitespace-only settings.
  • cd skill-scan && .venv/bin/ruff check skill_scan/utils/llm.py pytests/test_llm_request.py: passed.
  • cd skill-scan && .venv/bin/python main.py --help: passed.
  • go build ./...: passed.
  • git diff --check: passed.

Compared the base and candidate through the pinned openai==2.8.1 SDK using an HTTPX mock transport and a valid streamed response:

Environment Before After
REASONING_EFFORT=high Parameter omitted "reasoning_effort": "high"
Unset Parameter omitted Parameter omitted
Whitespace only Parameter omitted Parameter omitted

Both versions parsed the streamed response successfully. No external provider calls were made; this validates request serialization, not account/model availability.

Related issue

N/A. Downstream integration: openclaw/clawhub#3800.

Checklist

  • go build ./... succeeds locally
  • I followed the existing file/rule format conventions for this contribution type
  • I have not introduced hardcoded secrets or credentials

@boy-hack
boy-hack merged commit 14beb9b into Tencent:main Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants