Skip to content

fix: move _transform_output to base _predict pipeline#187

Merged
Kamilbenkirane merged 1 commit into
mainfrom
fix/move-transform-output-to-predict-pipeline
Feb 25, 2026
Merged

fix: move _transform_output to base _predict pipeline#187
Kamilbenkirane merged 1 commit into
mainfrom
fix/move-transform-output-to-predict-pipeline

Conversation

@Kamilbenkirane

Copy link
Copy Markdown
Member

Summary

Closes #142

  • Moves _transform_output() call from each provider's _parse_content() to the base _predict() pipeline in ModalityClient, preventing silent structured output failures when new providers forget the call
  • Removes redundant _transform_output() from all 11 text provider _parse_content() methods
  • Updates 4 provider mixin docstrings that showed the old pattern in usage examples
  • Makes _transform_output signature generic (Content instead of TextContent) to work at the base pipeline level
  • Changes ParameterMapper.parse_output base signature to Any as a pragmatic bridge — tracked for proper generic fix in Make ParameterMapper generic on Content type #186

Test plan

  • Added TestPredictTransformOutput with 2 integration tests verifying _predict() applies _transform_output correctly
  • All 478 unit tests pass
  • mypy passes clean (no type: ignore needed at call sites)
  • All pre-commit hooks pass (ruff, mypy, bandit, tests)

@claude

claude Bot commented Feb 25, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@Kamilbenkirane Kamilbenkirane merged commit affd85a into main Feb 25, 2026
11 checks passed
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.

Move _transform_output from provider _parse_content to base _predict pipeline

1 participant