Skip to content

feat(DATAGO-126654): implement dynamic model provider configuration and support [4/4]#1200

Open
cyrus2281 wants to merge 30 commits intocyrus/DATAGO-126654/servicesfrom
cyrus/DATAGO-126654/platform-service
Open

feat(DATAGO-126654): implement dynamic model provider configuration and support [4/4]#1200
cyrus2281 wants to merge 30 commits intocyrus/DATAGO-126654/servicesfrom
cyrus/DATAGO-126654/platform-service

Conversation

@cyrus2281
Copy link
Collaborator

What is the purpose of this change?

This PR implements enterprise model configuration management to enable dynamic model updates without restarting components. It includes a model configuration bootstrap mechanism, allowing components to request their specific model configurations at startup and receive updates when configurations change.

How was this change implemented?

This PR implements a comprehensive enterprise model configuration system:

  • Enhanced LiteLlm class to support dynamic model configuration and status management
  • Created DynamicModelProvider for managing model configuration lifecycle
  • Added model bootstrap and update topics for A2A communication
  • Implemented platform service endpoints for model configuration CRUD operations
  • Added model configuration topic listener/emitter for dynamic updates
  • Fixed WebUI token refresh mechanism to proactively refresh tokens before expiration
  • Updated components to streamline model access through a unified get_lite_llm_model method

Key commits:

  • feat: implement model configurations router with CRUD endpoints and topic emissions
  • feat: enhance DynamicModelProvider with ModelConfigReceiverComponent
  • Implement model configuration bootstrap listener and update topic management
  • fix: proactive token refresh for WebUI

Key Design Decisions

The design focuses on two key areas:

  1. Model Configuration Management: Using a centralized platform service for model configuration with dynamic updates via A2A topics. This allows for:

    • Enterprise model configurations to be managed centrally
    • Components to lazily initialize with placeholder models and request their configurations
    • Real-time updates to model configurations without component restarts
  2. WebUI Token Management: Implementing proactive token refresh to prevent 401 errors, especially with long-lived SSE connections that can't easily retry on token expiration.

How was this change tested?

  • Manual testing: Dynamic model configuration changes via A2A messaging
  • Unit tests: WebUI token refresh mechanism and SSE recovery behavior
  • Unit tests: Dynamic model provider functionality
  • Known limitations: Model configuration CRUD operations in platform service are partially implemented

Is there anything the reviewers should focus on/be aware of?

Reviewers should examine the LiteLlm model lifecycle management and how the model configuration flows through the system. The WebUI proactive token refresh implementation is also significant for eliminating 401 errors during long SSE sessions.

solace-pjones and others added 23 commits March 13, 2026 15:58
…agement

- Added BootstrapRequestListenerComponent to handle model config bootstrap requests.
- Introduced dynamic model provider topics for better topic management.
- Enhanced PlatformServiceComponent to start a bootstrap listener based on feature flag.
- Updated ModelConfigService to retrieve model configurations by alias or ID.
- Added FastAPI dependencies for accessing component instances.
@cyrus2281 cyrus2281 self-assigned this Mar 17, 2026
@cyrus2281 cyrus2281 changed the title feat(DATAGO-126654): implement dynamic model provider configuration and support feat(DATAGO-126654): implement dynamic model provider configuration and support [4/4] Mar 17, 2026
# Note: self.max_message_size_bytes is already set by SamComponentBase

try:
self._component_id = "platform_service"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this cause platform to create queues similar to a gateway ? is that introduced for the model UI ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, it will only be used for a topic address and a topic subscription (without queue)

Base automatically changed from solace-pjones/DATAGO-126600/database-schema-community-v2 to main March 19, 2026 15:22
@cyrus2281 cyrus2281 changed the base branch from main to cyrus/DATAGO-126654/services March 19, 2026 15:57
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.

3 participants