Summary of the two bugs and proposed fixes:
-
Model routing — AILANG sees openai/google/gemma-4-26B-A4B-it as a vendor/model OpenRouter pattern and sends it there. Fix: add a second [[ai_provider]] block (motoko-local) in ailang.toml pointing at OPENAI_BASE_URL, extend strip_provider_prefix to handle openai/, and route openai/-prefixed models to the local provider via callStream instead of stepWithStream.
-
Status bar display — AgentUI constructor on index.ts:617 is missing the profile param, so it always shows "default". One-line fix.
The plan recommends spiking first — add the provider block and test whether ${OPENAI_BASE_URL} interpolation works in ailang.toml before building the full routing logic, since that's the key unknown.
Summary of the two bugs and proposed fixes:
Model routing — AILANG sees openai/google/gemma-4-26B-A4B-it as a vendor/model OpenRouter pattern and sends it there. Fix: add a second [[ai_provider]] block (motoko-local) in ailang.toml pointing at OPENAI_BASE_URL, extend strip_provider_prefix to handle openai/, and route openai/-prefixed models to the local provider via callStream instead of stepWithStream.
Status bar display — AgentUI constructor on index.ts:617 is missing the profile param, so it always shows "default". One-line fix.
The plan recommends spiking first — add the provider block and test whether ${OPENAI_BASE_URL} interpolation works in ailang.toml before building the full routing logic, since that's the key unknown.