Skip to content

fix(tools): replace ± with +/- in session_search docstring to avoid unicode parse errors - #50961

Open
Morad37 wants to merge 1 commit into
NousResearch:mainfrom
Morad37:fix/session-search-unicode-50959
Open

Morad37 wants to merge 1 commit into
NousResearch:mainfrom
Morad37:fix/session-search-unicode-50959

Conversation

@Morad37

@Morad37 Morad37 commented Jun 22, 2026

Copy link
Copy Markdown

The session_search tool docstring contains 5 instances of the ± character (U+00B1). Several provider APIs (DeepSeek, OpenRouter) reject this character in tool descriptions, returning HTTP 400:

Failed to parse the request body as JSON: tools[9].function.description: invalid unicode code point

Every request fails as soon as session_search is among the enabled tools, provider-agnostic.

Fix: replace all ± with +/- in docstring comments.

Closes #50959

@Morad37
Morad37 requested a review from a team June 22, 2026 17:50
@alt-glitch alt-glitch added invalid This doesn't seem right comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have labels Jun 22, 2026
@alt-glitch

Copy link
Copy Markdown

Note: this branch is a whole-fork push (1,291 files changed, ~33.9k additions / ~129.8k deletions) rather than the focused ± -> +/- docstring change described. As-is it's unreviewable and would delete most of the repo. Please rebase onto current main and open a PR containing only the session_search docstring change for #50959.

@Morad37
Morad37 force-pushed the fix/session-search-unicode-50959 branch from 6a2077c to fd30472 Compare June 23, 2026 13:11
@Morad37

Morad37 commented Jun 23, 2026

Copy link
Copy Markdown
Author

The branch was contaminated because the fork main was behind upstream. Force-pushed a clean branch from upstream main -- the diff now shows only the 5 docstring changes described.

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused compatibility fix. Current main still has the three runtime-facing U+00B1 occurrences in the registered SESSION_SEARCH_SCHEMA at tools/session_search_tool.py:778, tools/session_search_tool.py:787, and tools/session_search_tool.py:789; the schema is registered at tools/session_search_tool.py:903. The PR diff replaces all five target occurrences with ASCII +/- and introduces no behavioral or schema-shape change.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-massive Sweeper blast radius: massive — everyone, every turn (invariant surface) labels Jul 15, 2026
@alt-glitch alt-glitch added type/bug Something isn't working comp/tools Tool registry, model_tools, toolsets duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists and removed invalid This doesn't seem right comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have labels Jul 15, 2026
@teknium1 teknium1 added the area/sessions Session lifecycle, resume, persistence, history label Jul 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sessions Session lifecycle, resume, persistence, history comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists sweeper:blast-massive Sweeper blast radius: massive — everyone, every turn (invariant surface) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: tools[].function.description (session_search) reaches API with invalid Unicode code point — HTTP 400 across providers

3 participants