Repository navigation
Read render-marked tool parameter schemas as their boolean schemas - #2681
Closed
jonathan308 wants to merge 5 commits into
Closed
jonathan308 wants to merge 5 commits into
jonathan308 wants to merge 5 commits into
Conversation
The coordinator forwards a parameter schema of {}, true or false as
{"type": "string", "x-darkbloom-original-boolean-schema": <bool>}. The strict
check (ToolConstraintValidation) reads that marker; argument reading did
not, so an untyped parameter or array item read as a declared string. The
reading the parser uses (ToolArgumentSchemas.typingFiniteValues) now turns
such a node, under the strict check's own conditions (a string type, a
Boolean marker, annotations only), back into {} with its annotations or
into false.
DARKBLOOM_LOCAL_ALLOW_TOOL_SCHEMA_METADATA=1 is a testing switch that lets
the local API accept tool schemas carrying the marker, as the coordinator
forwards them, so a loopback run can serve production's shapes. Off by
default, logged when on; the coordinator path is unchanged.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…he Qwen grammar
A strict tool forwarded with {}, true and false parameters (and items) as
marked string render types reads them as {} and false (argumentTools),
which also feed the strict grammar's conversion. The grammar reads a bare
false or {} as text, and either constrains the call (an untyped value is
free text) or declines it; it never holds such a value to the render
type's string. Auto and required choices both.
Both branches add tests at the same places in DeclaredToolArgumentTests and QwenStrictToolGrammarTests; the merge keeps every test of both. The sources merge without conflict.
jonathan308
changed the base branch from
dev
to
perf/sdk-pin-literals-under-combinators
November 24, 2026 15:56
This was referenced Nov 24, 2026
… before
Under tool_choice required the declared tools compile, and a marked node
compiles only as exactly {type: string, <marker>: true}
(ToolConstraintSchema); an annotated or false marker is refused there, as
on dev before this change. The test now expects that refusal for the
forced choice and checks the argument reading and grammar under auto.
4 of 6 tasks
This was referenced Nov 24, 2026
Collaborator
Author
|
Closing: this branch's head (cd0fbb8) is already contained in dev. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the coordinator repairs a tool parameter declared as a boolean schema (
{}ortrue, orfalse), it forwards{type: "string"}plus anx-darkbloom-original-boolean-schemamarker. The strict check already reads such a marked node as the boolean schema it came from. The argument reading did not, so a value under a marked{}was read as a string.ToolArgumentSchemasnow reads a marked node (annotations only beside the marker) as{}with its annotations, or asfalse, at every position it walks: properties, items,prefixItemstails and union branches. A marker beside an assertion stays as written.DARKBLOOM_LOCAL_ALLOW_TOOL_SCHEMA_METADATA=1(exactly1), lets the local server accept internal schema metadata so these shapes can be tried locally. It is off by default, logs one warning when on, and leaves the coordinator path unchanged. Documented indocs/reference/configuration.md.{}(for example45) read as numbers once the SDK pin carries the literal reading (Pin the SDK with JSON literals under combinator argument schemas, and match the Qwen grammar #2640).Test plan
{}items, nullable{}with a description, afalseprefixItemstail, a marker beside an assertion), and the switch on and off.Refactor pass
Refactor pass: done; no behaviour-preserving changes warranted
AI usage
accurately describes the code changes.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.