Skip to content

BRIC-4: Add CORS middleware for composable-ui#8

Merged
Kaiohz merged 4 commits intomainfrom
BRIC-4/add-cors-middleware
Apr 6, 2026
Merged

BRIC-4: Add CORS middleware for composable-ui#8
Kaiohz merged 4 commits intomainfrom
BRIC-4/add-cors-middleware

Conversation

@Kaiohz
Copy link
Copy Markdown
Contributor

@Kaiohz Kaiohz commented Apr 6, 2026

Jira

BRIC-4

Changes

  • Add CORSMiddleware to FastAPI app allowing requests from http://localhost:8030
  • Required for the new composable-ui frontend to interact with the API

Tests

  • Existing tests pass
  • Verified CORS headers work with composable-ui in docker compose

Kaiohz added 4 commits April 6, 2026 07:36
Allow cross-origin requests from http://localhost:8030 to enable
the composable-ui frontend to interact with the API.
stream_mode="messages-tuple" yields (chunk, metadata), not (type_str, msg).
The filter msg_type == "ai" never matched because msg_type was an
AIMessageChunk object. Switch to stream_mode="messages" and check
chunk.type == "AIMessageChunk" instead.
Mock now yields (chunk_with_type, metadata) instead of (type_str, msg)
to match the stream_mode="messages" format used in the adapter.
@Kaiohz Kaiohz marked this pull request as ready for review April 6, 2026 08:28
@Kaiohz Kaiohz merged commit c064271 into main Apr 6, 2026
1 check passed
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