Skip to content

feat(llm): implement resilient streaming and native structured output#402

Open
JeanMertz wants to merge 1 commit intomainfrom
pr/3-llm-core
Open

feat(llm): implement resilient streaming and native structured output#402
JeanMertz wants to merge 1 commit intomainfrom
pr/3-llm-core

Conversation

@JeanMertz
Copy link
Collaborator

Introduce a provider-agnostic resilience layer for LLM requests and enable native structured output support across all providers.

This overhaul replaces the previous tool-based schema enforcement with native provider capabilities (OpenAI Strict Mode, Anthropic Structured Outputs, Gemini JSON Schema). It includes a robust error classification system (StreamError) that automatically handles retries with exponential backoff for transient network errors and rate limits.

The tool execution layer is refactored to support asynchronous cancellation, improved parameter validation with automatic default injection, and a new builtin tool system starting with describe_tools.

Additional enhancements include:

  • Support for adaptive reasoning in Claude Opus 4.6+.
  • Complete rewrite of the llamacpp provider to use SSE and support deepseek-style reasoning content.
  • A new MockProvider and ExecutorSource to facilitate side-effect free testing of conversation flows.
  • Automated description splitting for generating concise tool summaries.

Introduce a provider-agnostic resilience layer for LLM requests and
enable native structured output support across all providers.

This overhaul replaces the previous tool-based schema enforcement with
native provider capabilities (OpenAI Strict Mode, Anthropic Structured
Outputs, Gemini JSON Schema). It includes a robust error classification
system (`StreamError`) that automatically handles retries with
exponential backoff for transient network errors and rate limits.

The tool execution layer is refactored to support asynchronous
cancellation, improved parameter validation with automatic default
injection, and a new builtin tool system starting with
`describe_tools`.

Additional enhancements include:
- Support for adaptive reasoning in Claude Opus 4.6+.
- Complete rewrite of the `llamacpp` provider to use SSE and support
  deepseek-style reasoning content.
- A new `MockProvider` and `ExecutorSource` to facilitate side-effect
  free testing of conversation flows.
- Automated description splitting for generating concise tool summaries.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
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.

1 participant