Skip to content

refactor: rename injected thought field to toolcall_reason#152

Merged
Oaklight merged 1 commit into
masterfrom
feature/toolcall-reason-rename
May 15, 2026
Merged

refactor: rename injected thought field to toolcall_reason#152
Oaklight merged 1 commit into
masterfrom
feature/toolcall-reason-rename

Conversation

@Oaklight
Copy link
Copy Markdown
Owner

Summary

  • Rename the think-augmented injected field from thought to toolcall_reason to eliminate naming collisions with tools that natively declare a thought parameter (e.g. ThinkTool). This deletes _has_native_thought_param() and all conditional call sites, simplifying the execution path.
  • Add a version info button (ⓘ) in the admin panel header, backed by a new GET /api/info endpoint that returns toolregistry and toolregistry_server versions.
  • Validate environment variable requirements before enabling tools/namespaces — parses the "Missing env: ..." disable reason and returns 400 if vars are still unset. Also resets the UI toggle on enable failure.

Test plan

  • Core tests: 914 passed
  • Hub tests: 667 passed
  • ruff check + ruff format clean
  • Manual: start hub with admin panel, click ⓘ button to see version info
  • Manual: try enabling a tool with missing env vars, confirm 400 error and toggle reset
  • Manual: verify think tool's think checkbox is interactive (not grayed out)

@Oaklight Oaklight force-pushed the feature/toolcall-reason-rename branch from 6a4a6b0 to c2a2088 Compare May 15, 2026 08:29
Rename the think-augmented tool calling field from `thought` to
`toolcall_reason` to eliminate naming collisions with tools that
natively declare a `thought` parameter (e.g. ThinkTool).

This simplifies the codebase by removing `_has_native_thought_param()`
and all its conditional call sites — the unique field name makes
collision detection unnecessary.

Also includes three admin panel fixes:
- Add version info button (GET /api/info) showing library versions
- Validate env var requirements before enabling tools/namespaces
- Reset toggle state on enable failure
@Oaklight Oaklight force-pushed the feature/toolcall-reason-rename branch from c2a2088 to 3398eb0 Compare May 15, 2026 09:07
@Oaklight Oaklight merged commit 16d1c09 into master May 15, 2026
3 checks passed
@Oaklight Oaklight deleted the feature/toolcall-reason-rename branch May 15, 2026 09:11
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.

1 participant