Skip to content

fix: drop the llm.tools copies only when spelled like their schema key, and cover the orphan and native cases - #295

Merged
PabloPardoGarcia merged 2 commits into
mainfrom
pablo/tool-copies-extra-tests
Nov 17, 2026
Merged

PabloPardoGarcia merged 2 commits into
mainfrom
pablo/tool-copies-extra-tests

Conversation

@PabloPardoGarcia

@PabloPardoGarcia PabloPardoGarcia commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

This follows up #294 with two changes.

Copy keys follow the schema key as written. A copy key is now the schema key as written with .tool.json_schema stripped. Before, it was rebuilt from the parsed integer index. This is how the sink (argus-core#771) and the TypeScript SDK (rius-sdk-typescript#259) already do it. A copy is dropped only when it is spelled exactly like its schema key: llm.tools.01.tool.json_schema takes llm.tools.01.tool.name with it and leaves llm.tools.1.tool.name alone.

Tests. Three new cases:

  • the copy is dropped only when it is spelled like its schema key (above);

  • a description at an index with no schema is kept;

  • the copies still go when a native gen_ai.tool.definitions is already on the span.

  • ruff format --check, ruff check, mypy: clean

  • pytest: 3132 passed, 22 skipped, 1 xfailed

… definitions

Two cases for the llm.tools name and description drop: a description at an index with no schema stays, and the copies still go when a native gen_ai.tool.definitions is already on the span.
… its schema key

The copy key is now the schema key as written with .tool.json_schema stripped, as the sink does, rather than rebuilt from the parsed index. llm.tools.01.tool.json_schema takes llm.tools.01.tool.name with it and leaves llm.tools.1.tool.name alone.
@PabloPardoGarcia PabloPardoGarcia changed the title test: cover an orphan tool description and the copy drop under native definitions fix: drop the llm.tools copies only when spelled like their schema key, and cover the orphan and native cases Nov 17, 2026
@PabloPardoGarcia
PabloPardoGarcia merged commit c40cdf1 into main Nov 17, 2026
12 checks passed
@PabloPardoGarcia
PabloPardoGarcia deleted the pablo/tool-copies-extra-tests branch November 17, 2026 09:08
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