Skip to content

Propagate agent information into LLM calls#4876

Open
adriangb wants to merge 3 commits intomainfrom
add-baggage
Open

Propagate agent information into LLM calls#4876
adriangb wants to merge 3 commits intomainfrom
add-baggage

Conversation

@adriangb
Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions bot added size: S Small PR (≤100 weighted lines) feature New feature request, or PR implementing a feature (enhancement) labels Mar 27, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Docs Preview

commit: 65ff1e3
Preview URL: https://065af93b-pydantic-ai-previews.pydantic.workers.dev

… managers

Consolidate baggage, concurrency, graph iteration, and toolset context
managers into a single AsyncExitStack, reducing nesting depth and ensuring
baggage is properly scoped to the agent run lifetime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added size: M Medium PR (101-500 weighted lines) and removed size: S Small PR (≤100 weighted lines) labels Mar 27, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

retries: int = 0
run_step: int = 0
run_id: str = dataclasses.field(default_factory=lambda: str(uuid.uuid4()))
run_id: str = dataclasses.field(default_factory=lambda: ulid_as_uuid(Random(), lambda: time.time_ns() // 1_000_000))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚩 run_id format change: UUID4 with dashes → ULID hex without dashes

The run_id field changed from str(uuid.uuid4()) (36-char hyphenated UUID like 550e8400-e29b-41d4-a716-446655440000) to ulid_as_uuid(...) (32-char plain hex like 0192a7b3c4d5e6f7a8b9c0d1e2f3a4b5). This is an intentional change, but it alters the format of GraphAgentState.run_id which is a public field. Any downstream code (user code, observability tooling, databases) that parses or validates run_id as a UUID with dashes would break. This is likely acceptable since run_id is typed as str with no documented format, but worth noting as a behavioral change.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Use IsStr() matcher for non-deterministic ULID-based conversation IDs
in span attribute snapshots.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature request, or PR implementing a feature (enhancement) size: M Medium PR (101-500 weighted lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant