Skip to content

Conversation

@eb8680
Copy link
Contributor

@eb8680 eb8680 commented Jan 13, 2026

This refactoring PR reorganizes the internals of handlers.llm around four new Operations, each of which (call_assistant, call_user, call_system, call_tool) is responsible for constructing all Messages for one role ("assistant", "user", "system", "tool") in the completions API.

It also avoids the anti-pattern of handling Template.__apply__, except as a temporary expedient in RetryLLMHandler, and includes some general code cleanup of completions.py.

I'm putting it up as a draft for discussion, since I haven't finished getting tests to pass and there are still some outstanding design questions, particularly around the desired semantics of failure and repetition.

@eb8680 eb8680 changed the base branch from staging-llm to master January 15, 2026 17:08
@eb8680 eb8680 changed the base branch from master to staging-llm January 15, 2026 17:23
@eb8680 eb8680 force-pushed the eb-llm-message-ops branch from 061a342 to fa62848 Compare January 15, 2026 17:30
@eb8680 eb8680 changed the base branch from staging-llm to master January 15, 2026 17:30
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.

2 participants