Skip to content

v1.5.0

Latest

Choose a tag to compare

@dalehurley dalehurley released this 08 Feb 13:09

Cross-Vendor Dynamic Model Fusion (DMF)

Adds multi-vendor LLM support, enabling Claude to orchestrate OpenAI and Google Gemini as callable tools during agent execution. Claude remains the primary orchestrator while delegating to vendor-specific capabilities via the existing ToolInterface.

New Features

  • VendorRegistry — API key management for Anthropic, OpenAI, and Google Gemini with auto-detection from environment variables
  • ModelRegistry — Catalog of 30+ models across all three vendors with capability metadata (model IDs, descriptions, defaults)
  • Capability enum — Typed capabilities: chat, web_search, image_generation, text_to_speech, speech_to_text, code_execution, grounding, deep_research
  • CrossVendorToolFactory — Auto-creates vendor tools from available API keys; supports per-capability tool creation

Vendor Tools

Tool Vendor Capability
vendor_chat OpenAI / Gemini Cross-vendor chat delegation
openai_web_search OpenAI Real-time web search via Responses API
openai_image_generation OpenAI GPT Image 1.5 generation
openai_text_to_speech OpenAI TTS with voice styles and instructions
gemini_grounding Google Google Search grounded responses with citations
gemini_code_execution Google Server-side Python execution in sandbox
gemini_image_generation Google Nano Banana image generation and editing

Architecture

  • Lightweight cURL-based HTTP adapters (no vendor SDK dependencies)
  • Retry logic with exponential backoff
  • Per-vendor configuration overrides (custom models, timeouts, base URLs)
  • Full compatibility with existing ToolInterface — vendor tools integrate seamlessly with any agent type

Testing

  • 138 tests with 562 assertions (126 unit + 12 live integration)
  • Live integration tests verify all vendor APIs (chat, web search, grounding, code execution, cross-vendor delegation)

Usage

$vendorRegistry = VendorRegistry::fromEnvironment();
$factory = new CrossVendorToolFactory($vendorRegistry);
$tools = $factory->createAllTools();

$agent = new ReactAgent($client, [
    'tools' => $tools,
]);

Set API keys in .env:

OPENAI_API_KEY=your_key
GEMINI_API_KEY=your_key

See examples/cross_vendor_dmf.php for a complete walkthrough.