feat: expose output schema to model input filters#3691
Closed
its-amann wants to merge 1 commit into
Closed
Conversation
Author
|
@codex review |
|
Note You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Member
|
Thanks for the contribution. The implementation is thoughtful, but the linked issue does not currently demonstrate a concrete use case that requires changing the output schema inside call_model_input_filter. Most known cases can select Agent.output_type before the run or use a separately configured agent. |
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
output_schemaonModelInputDataforcall_model_input_filter.get_new_response.ToolOutputTrimmerfrom dropping schema metadata.AgentOutputSchema(str).Closes #3563
Tests
uv run ruff check src/agents/run_config.py src/agents/run_internal/turn_preparation.py src/agents/run_internal/run_loop.py src/agents/extensions/tool_output_trimmer.py tests/test_call_model_input_filter_unit.py tests/extensions/test_tool_output_trimmer.py tests/test_agent_runner.py tests/test_server_conversation_tracker.pyuv run ruff format --check src/agents/run_config.py src/agents/run_internal/turn_preparation.py src/agents/run_internal/run_loop.py src/agents/extensions/tool_output_trimmer.py tests/test_call_model_input_filter_unit.py tests/extensions/test_tool_output_trimmer.py tests/test_agent_runner.py tests/test_server_conversation_tracker.pyuv run pyright --project pyrightconfig.json src/agents/run_config.py src/agents/run_internal/turn_preparation.py src/agents/run_internal/run_loop.py src/agents/extensions/tool_output_trimmer.py tests/test_call_model_input_filter_unit.py tests/extensions/test_tool_output_trimmer.py tests/test_agent_runner.py tests/test_server_conversation_tracker.pyuv run mypy src/agents/run_config.py src/agents/run_internal/turn_preparation.py src/agents/run_internal/run_loop.py src/agents/extensions/tool_output_trimmer.py tests/test_call_model_input_filter_unit.py tests/extensions/test_tool_output_trimmer.py tests/test_agent_runner.py tests/test_server_conversation_tracker.py --exclude siteuv run pytest tests/test_call_model_input_filter_unit.py tests/extensions/test_tool_output_trimmer.py tests/test_agent_runner.py::test_conversation_lock_rewind_skips_when_no_snapshot tests/test_agent_runner.py::test_get_new_response_uses_agent_retry_settings tests/test_server_conversation_tracker.py::test_get_new_response_marks_filtered_input_as_sent tests/test_server_conversation_tracker.py::test_run_single_turn_streamed_marks_filtered_input_as_sent -q