Skip to content

Commit 12894ca

Browse files
alenkaczclaude
andcommitted
feat(frontend): add AI Gateway integration for dynamic provider and model selection
Add comprehensive AI Gateway integration to Console UI with the following features: - **Gateway Selection**: Fetch and display available AI Gateways from AI Gateway API - Auto-select first available gateway when creating agents - Show gateway ID in agent configuration details - **Dynamic Provider Loading**: Fetch LLM providers from AI Gateway ListModelProviders API - Replace hardcoded provider list with dynamic data - Display provider logos from API response - **Dynamic Model Loading**: Fetch models from AI Gateway ListModels API - Filter models by selected provider - Auto-select first model when provider changes - Show model metadata (context window, description) - **Dual-Mode Support**: - AI Gateway mode: Use gateway for auth, dynamic providers/models, hide API key field - Legacy mode: Use API key, hardcoded providers/models (backward compatible) - **Feature Flag**: enable-api-key-configuration-agent - false (default): AI Gateway mode with dynamic data - true: Legacy mode with hardcoded providers and API key requirement - **API Integration**: - Add buf.build/redpandadata/ai-gateway dependency - Generate TypeScript types for Gateway, ModelProviders, and Models services - Create React Query hooks with proper caching and authentication - Configure dev server proxy for AI Gateway API (/.redpanda/api/redpanda.api.aigateway.v1) - **Validation**: - API key optional when gateway is configured (proto updated with ignore = IGNORE_IF_ZERO_VALUE) - Gateway required when available - Conditional validation based on mode - **UX Improvements**: - No layout shift: gateway field always visible (disabled when unavailable) - Loading states for gateway/provider/model dropdowns - No validation errors during loading transitions - Icons displayed for providers in both selected state and dropdown Technical details: - Proto generation includes AI Gateway v1 API from buf.build - Proxy configuration in both Console UI and Cloud UI to handle CORS - Custom transport for AI Gateway with bearer token authentication - React Query caching with staleTime to prevent excessive refetching Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
1 parent a73e658 commit 12894ca

File tree

219 files changed

+109352
-207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+109352
-207
lines changed

backend/pkg/protogen/redpanda/api/aigateway/v1/access_control.pb.go

Lines changed: 2415 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/aigateway/v1/access_control.pb.gw.go

Lines changed: 895 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/aigateway/v1/access_control_grpc.pb.go

Lines changed: 452 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/aigateway/v1/account.pb.go

Lines changed: 1443 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/aigateway/v1/account.pb.gw.go

Lines changed: 683 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/aigateway/v1/account_grpc.pb.go

Lines changed: 378 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/aigateway/v1/aigatewayv1connect/access_control.connect.go

Lines changed: 375 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/aigateway/v1/aigatewayv1connect/access_control.connect.gw.go

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)