Skip to content

fix(tool): include quality fields in output schema#128

Merged
chaliy merged 2 commits into
mainfrom
2026-05-17-fix-output-schema-for-fetchresponse
May 17, 2026
Merged

fix(tool): include quality fields in output schema#128
chaliy merged 2 commits into
mainfrom
2026-05-17-fix-output-schema-for-fetchresponse

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 17, 2026

Motivation

  • The FetchResponse now serializes quality fields (word_count, redirect_chain, is_paywall) but the tool's advertised JSON output schema had "additionalProperties": false and omitted these fields, causing strict consumers to reject otherwise valid responses.

Description

  • Add word_count, redirect_chain, and is_paywall to the build_output_schema() properties so the schema matches serialized FetchResponse output.
  • Extend the test_tool_schemas unit test to assert those three properties exist in the output schema.
  • Minor formatting applied via cargo fmt as part of the change surface.

Testing

  • Ran cargo fmt --all which completed successfully.
  • Ran cargo test -p fetchkit test_tool_schemas and the test_tool_schemas assertion passed.

Codex Task

@chaliy chaliy merged commit a9ac6b2 into main May 17, 2026
11 checks passed
@chaliy chaliy deleted the 2026-05-17-fix-output-schema-for-fetchresponse branch May 17, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant