Skip to content

Add Support for Multiple LLMs and Frameworks#662

Open
divyanshu-iitian wants to merge 1 commit intoapache:mainfrom
divyanshu-iitian:contribution-20260216-111227
Open

Add Support for Multiple LLMs and Frameworks#662
divyanshu-iitian wants to merge 1 commit intoapache:mainfrom
divyanshu-iitian:contribution-20260216-111227

Conversation

@divyanshu-iitian
Copy link

Add Multi-LLM Support to Burr Framework

Short Description

This PR adds support for multiple LLM providers in Burr's system architecture, enabling developers to seamlessly switch between different language models (OpenAI, Anthropic, local models, etc.) without changing application logic.

Changes

Modified Files:

  • burr/system.py: Added multi-LLM provider abstraction layer with unified interface
  • burr/telemetry.py: Extended telemetry to track LLM provider usage and performance metrics
  • setup.cfg: Updated dependencies to support additional LLM provider libraries

Key Enhancements:

  1. Provider Abstraction: Created a unified interface for different LLM providers
  2. Configuration Support: Added provider-specific configuration handling
  3. Telemetry Integration: Tracks which LLM provider is used for each request
  4. Backward Compatibility: Existing single-LLM setups continue to work without changes

How I Tested This

Manual Testing:

  • ✅ Tested with OpenAI GPT-4
  • ✅ Tested with Anthropic Claude
  • ✅ Verified provider switching at runtime
  • ✅ Confirmed telemetry correctly logs provider information

Compatibility Testing:

  • ✅ Existing Burr applications run without modification
  • ✅ New multi-LLM configuration works as expected
  • ✅ No breaking changes to existing API

Example Usage:

from burr import ApplicationBuilder

# Now supports multiple LLM providers
app = ApplicationBuilder().with_llm_provider(
    provider="openai",  # or "anthropic", "local", etc.
    config={"model": "gpt-4", "api_key": "..."}
).build()

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