-
Notifications
You must be signed in to change notification settings - Fork 426
feat(frontend): Add AI Gateway integration for dynamic provider and model selection #2175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
12894ca
7d32912
c9246f8
1a9c9b8
336095f
76d8f5b
b8d7745
d5a9c71
3c8965c
fe88a09
df53a3b
cebef26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,17 +48,37 @@ export default defineConfig({ | |
| }, | ||
| }, | ||
| server: { | ||
| port: 3004, | ||
| htmlFallback: 'index', | ||
| cors: { | ||
| origin: ['http://localhost:3000', 'http://localhost:9090'], | ||
| credentials: true, | ||
| }, | ||
| proxy: { | ||
| context: ['/api', '/redpanda.api', '/auth', '/logout'], | ||
| target: process.env.PROXY_TARGET || 'http://localhost:9090', | ||
| changeOrigin: !!process.env.PROXY_TARGET, | ||
| secure: process.env.PROXY_TARGET ? false : undefined, | ||
| }, | ||
| proxy: [ | ||
| // AI Gateway API - proxy to separate AI Gateway service | ||
| // Matches: /.redpanda/api/redpanda.api.aigateway.v1.* | ||
| // Proto package is: redpanda.api.aigateway.v1 (includes .api) | ||
| // AI Gateway now expects the full path with .api | ||
| ...(process.env.AI_GATEWAY_URL | ||
| ? [ | ||
| { | ||
| context: ['/.redpanda/api/redpanda.api.aigateway.v1'], | ||
| target: process.env.AI_GATEWAY_URL, | ||
| changeOrigin: true, | ||
| secure: false, | ||
| logLevel: 'debug', | ||
| // No pathRewrite - AI Gateway expects full path with .api | ||
| }, | ||
| ] | ||
| : []), | ||
| // All other APIs - proxy to Console backend | ||
| { | ||
| context: ['/api', '/redpanda.api', '/auth', '/logout'], | ||
| target: process.env.PROXY_TARGET || 'http://localhost:9090', | ||
| changeOrigin: !!process.env.PROXY_TARGET, | ||
| secure: process.env.PROXY_TARGET ? false : undefined, | ||
| }, | ||
| ], | ||
|
Comment on lines
+56
to
+80
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we be able to proxy both Console backend and the new Gateway API? I think currently if
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think both works now 🤔 definitely works when I run it from local |
||
| }, | ||
| source: { | ||
| define: { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wouldn't always be the case - you should either run
bun run startfor enterprise orbun run start2 --port=3004