Skip to content

fix(ai-chat): unblock prod web history/usage/chat (unmodifiable Dio extra) - #122

Closed
soumya07ad wants to merge 7 commits into
mainfrom
feature/am-modern-ui/ai_chat
Closed

fix(ai-chat): unblock prod web history/usage/chat (unmodifiable Dio extra)#122
soumya07ad wants to merge 7 commits into
mainfrom
feature/am-modern-ui/ai_chat

Conversation

@soumya07ad

Copy link
Copy Markdown
Contributor

Summary

  • Production AI chat was stuck on Thinking with history showing Cannot modify unmodifiable Map because BaseOptions(extra: const {...}) made Dio extra immutable; configureAiWebCredentials then crashed and took down session/usage/chat providers.
  • Remove const from AI Dio extra maps and always copy extra before writing withCredentials.
  • Keep local launch / auth interceptor hardening from Feature/am modern UI/ai chat #121; add regression tests.

Why local worked but prod did not

Local branch already had the non-const extra fix; main/#121 deploy still used const maps on web.

Test plan

  • flutter test credentials extra + auth interceptor unit tests
  • Redeploy modern-ui to prod after merge
  • Hard refresh https://am.asrax.in/app/ai-chat
  • Confirm history loads, chat replies, token ring updates, Langfuse traces appear

soumya07ad and others added 7 commits September 7, 2026 16:49
Open /login on 127.0.0.1 for local UI against prod, improve session/usage errors, strip tool_code leaks, and make AuthInterceptor mutate headers safely.

Co-authored-by: Cursor <cursoragent@cursor.com>
…scripts

Keep session friendly errors and 127.0.0.1 launch URLs while preserving BFF bearer rules and 401 refresh from main.

Co-authored-by: Cursor <cursoragent@cursor.com>
const BaseOptions.extra crashed configureAiWebCredentials on Flutter web with unmodifiable Map, taking down session/usage/chat providers. Copy before write and add regression tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: ae5f6ea1-ed09-4de6-afc1-1eebe025abe9


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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