Skip to content

Conversation

samuelcolvin
Copy link
Member

No description provided.

@samuelcolvin samuelcolvin requested a review from Copilot March 28, 2025 13:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the "preparing model request params" span from the logging/tracing and updates associated snapshots and attributes in tests.

  • Removed the "preparing model request params" span from the children list in tests/test_logfire.py.
  • Updated span names, attributes, and timing (end_time) in tests/models/test_fallback.py to reflect the change.
  • Removed the tracer span block from pydantic_ai_slim/pydantic_ai/_agent_graph.py.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/test_logfire.py Removed span entries and updated the attributes index to align with the modified children list.
tests/models/test_fallback.py Updated span names, adjusted attribute structure (e.g. events format) and modified end_time values; also removed an unused import.
pydantic_ai_slim/pydantic_ai/_agent_graph.py Removed the tracer span block related to the "preparing model request params" span.
Comments suppressed due to low confidence (4)

tests/test_logfire.py:161

  • Verify that updating the chat span attributes index from [2] to [1] is intentional and that all dependent assertions have been adjusted accordingly.
chat_span_attributes = summary.attributes[1]

tests/models/test_fallback.py:119

  • [nitpick] Ensure that the span name 'chat function:success_response:' uses the intended colon pattern and that it is consistent with naming conventions in other spans.
'name': 'chat function:success_response:'

tests/models/test_fallback.py:189

  • [nitpick] Consider aligning the colon usage in the span name with that of similar spans to avoid confusion; the double colon here may be unintentional.
'name': 'chat function::success_response_stream',

tests/models/test_fallback.py:143

  • Confirm that the adjustment of the end_time value from 6000000000 to 4000000000 is correct according to the updated timing logic.
'end_time': 4000000000,

Copy link

github-actions bot commented Mar 28, 2025

Docs Preview

commit: 4d35631
Preview URL: https://fbb09fde-pydantic-ai-previews.pydantic.workers.dev

@samuelcolvin samuelcolvin merged commit 8b2a33e into main Mar 28, 2025
16 checks passed
@samuelcolvin samuelcolvin deleted the remove-prepare-span branch March 28, 2025 17:02
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.

2 participants