Skip to content

fix(ui): honor custom agent model_id when session is at DB default - #842

Merged
itomek merged 5 commits into
mainfrom
841-bug-gaia-agentui-ignores-custom-agent-model-choice
Apr 23, 2026
Merged

itomek merged 5 commits into
mainfrom
841-bug-gaia-agentui-ignores-custom-agent-model-choice

Conversation

@itomek

@itomek itomek commented Apr 20, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #841 — Agent UI ignores custom agent model choice.

Summary

_chat_helpers.py unconditionally passed model_id=<session model> to registry.create_agent(), defeating kwargs.setdefault("model_id", ...) in custom agents. setdefault only fires when the key is absent — an explicit kwarg, even if it equals the default, silences it.

  • Export SESSION_DEFAULT_MODEL from database.py — single source of truth replacing a duplicate string literal
  • Build create_kwargs conditionally via _build_create_kwargs(): omit model_id when the session is at the DB default so the agent's __init__ setdefault governs
  • Three-branch precedence: custom_model setting > session-explicit (≠ DB default) > omit kwarg
  • Use _effective_model(agent, fallback) (explicit None check, not or) for _maybe_load_expected_model pre-flight — Lemonade warm-up targets the agent's actual effective model after construction; log statements use it for observability
  • _store_agent cache key uses the pre-construction model_id (session intent) to match _get_cached_agent's lookup key — keeping store/lookup keys in sync regardless of what setdefault chooses

The initial implementation used _effective_model for the cache store key too, which caused a cache miss every turn for custom agents (e.g. those scaffolded from builder/template.py) whose setdefault model differs from the session default. A follow-up commit fixes that regression.

Test plan

  • pytest tests/unit/chat/ui/test_agent_model_override.py — registry mechanism: custom agent with setdefault gets its own model when UI omits kwarg
  • pytest tests/unit/chat/ui/test_chat_helpers_model_resolution.py — 10 unit tests: three-branch precedence, pre-flight contract, two static regression guards (bug: GAIA AgentUI ignores custom agent model choice #841 antipattern + cache-key divergence), cache-hit on second turn, ChatAgent bypass
  • pytest tests/integration/test_chat_ui_integration.py::TestCustomAgentModelChoice — end-to-end HTTP path
  • pytest tests/unit/ --ignore=tests/unit/chat/ui/test_sse_confirmation.py — full unit suite

)

Previously, _chat_helpers.py always passed model_id=<session model> explicitly
to registry.create_agent(), defeating kwargs.setdefault("model_id", ...) in
custom agents — which only fires when the key is absent.

Fix: build create_kwargs conditionally, omitting model_id when the session is
at the DB default so the agent's __init__ setdefault governs. Also use
agent.model_id (post-construction) for both _store_agent cache key and the
pre-flight _maybe_load_expected_model call.

Three-branch precedence: custom_model setting > session-explicit > omit kwarg.

Closes #841
@itomek itomek linked an issue Apr 20, 2026 that may be closed by this pull request
@github-actions github-actions Bot added the tests Test changes label Apr 20, 2026
@itomek
itomek force-pushed the 841-bug-gaia-agentui-ignores-custom-agent-model-choice branch from 62722de to 00b343a Compare April 20, 2026 23:00
…N_DEFAULT_MODEL

Addresses code review feedback on PR #842:

- Export SESSION_DEFAULT_MODEL from database.py (single source of truth)
  instead of duplicating the string literal in _chat_helpers.py
- Extract _build_create_kwargs() helper to eliminate the duplicate three-branch
  create_kwargs logic across non-streaming and streaming code paths
- Extract _effective_model() helper using explicit None check (not `or`)
  to safely read agent.model_id post-construction without treating empty
  string as missing
- Fix static regression guard regex to use [^()]* so nested helper calls
  inside create_agent() are not falsely flagged
- Update unit test to import SESSION_DEFAULT_MODEL instead of hardcoding
@itomek
itomek force-pushed the 841-bug-gaia-agentui-ignores-custom-agent-model-choice branch from 00b343a to 4acfd40 Compare April 20, 2026 23:10
@itomek itomek self-assigned this Apr 22, 2026
…ion (#842)

_store_agent was changed by the #842 fix to use _effective_model(agent,
model_id) as the cache key — the post-construction value set by kwargs.setdefault.
_get_cached_agent still looks up using the pre-construction model_id variable.
For custom agents whose setdefault model differs from the session model, the
keys never match and the agent is rebuilt on every turn.

Revert the two _store_agent call sites to use model_id (the pre-construction
intent key), matching what the lookup uses. _effective_model stays at the two
_maybe_load_expected_model sites (Lemonade pre-flight needs the actual model)
and in log statements (observability).

Add two regression guards:
- test_cache_hit_on_second_turn_for_setdefault_agent: two-turn cache-hit test
  with four assertions (call count, object identity, stored-key equality,
  agent.model_id). Covers the builder/template.py setdefault pattern.
- test_no_effective_model_in_store_agent_calls: static grep guard that asserts
  _store_agent never receives _effective_model(...) as a positional arg,
  preventing this pattern from silently returning in a future cleanup pass.
@itomek
itomek marked this pull request as ready for review April 22, 2026 22:17
@itomek
itomek requested a review from kovtcharov-amd as a code owner April 22, 2026 22:17
@github-actions

Copy link
Copy Markdown
Contributor

Summary

This PR fixes #841 cleanly by refactoring the UI→registry call site so model_id is no longer forced into create_agent kwargs when the user has made no explicit choice — letting a custom agent's kwargs.setdefault("model_id", ...) finally fire. The extraction into _build_create_kwargs / _effective_model plus the SESSION_DEFAULT_MODEL constant materially improves readability, and the test suite is unusually thorough (three-branch precedence, a cache-key regression pin for the #842 follow-up, two static source-grep guards against antipattern reintroduction, plus an end-to-end HTTP test). The fix is well-scoped and the diff is small for the amount of behavior it locks down.

The most important thing to know: the three-branch logic in _build_create_kwargs is quietly correct but depends on an unstated invariant — that registry.resolve_model() never returns SESSION_DEFAULT_MODEL. Worth documenting or guarding (see below).

Issues Found

🟢 Minor — _run_sync uses deprecated asyncio.get_event_loop() (tests/unit/chat/ui/test_chat_helpers_model_resolution.py:27-28)

Python 3.12 deprecated asyncio.get_event_loop() when there is no running loop (GAIA targets >=3.10 per setup.py). Each test run will emit a DeprecationWarning, and in a future Python it will raise. asyncio.run is the drop-in replacement for one-shot test coroutines.

def _run_sync(coro):
    return asyncio.run(coro)

🟢 Minor — resolve_model == DB default branch is silently coerced to omit (src/gaia/ui/_chat_helpers.py:90-127)

The docstring states the assumption ("if registry.resolve_model() already promoted model_id before this call, it is forwarded as-is via branch 2 (resolve_model result ≠ default)"), but if a future YAML manifest declares default_model: Qwen3.5-35B-A3B-GGUF (identical to SESSION_DEFAULT_MODEL), branch 2 fails and branch 3 omits the kwarg. In practice the end-state is the same model, but the log line ("session at DB default … setdefault/AgentConfig fallback will govern") becomes misleading — the caller thinks resolve_model was honored; the code silently bypassed it.

Not blocking — the behavioral outcome is correct — but a one-line assertion or a note in resolve_model that it must not return the DB default would harden the contract.

🟢 Minor — private alias duplicates a public constant (src/gaia/ui/_chat_helpers.py:76-77)

# Alias so call-sites read naturally; the canonical value lives in database.py.
_DB_DEFAULT_MODEL = SESSION_DEFAULT_MODEL

Using the imported SESSION_DEFAULT_MODEL directly reads just as naturally and removes one layer of indirection (and the "are these the same?" question for a future reader). The comment in database.py:24 already establishes it as the canonical value.

(Then update _chat_helpers.py:114 and :124 to reference SESSION_DEFAULT_MODEL directly.)

🟢 Minor — SQL schema DEFAULT still hardcodes the model string (src/gaia/ui/database.py:46)

The PR body claims SESSION_DEFAULT_MODEL becomes the "single source of truth replacing a duplicate string literal", but SCHEMA_SQL still embeds 'Qwen3.5-35B-A3B-GGUF' as the column default. That's unavoidable (SQL defaults can't reference Python constants) and already called out in the new comment, so this is a note rather than a request — the PR description slightly overstates the deduplication.

Strengths

  • Precedence logic is legible and justified. The three-branch comment plus the "setdefault only fires when the key is ABSENT" rationale means the next contributor won't reintroduce the bug by reflex.
  • Two static regression guards (test_no_direct_model_id_kwarg_in_create_agent_calls, test_no_effective_model_in_store_agent_calls) fire in <5ms and catch the exact antipatterns bug: GAIA AgentUI ignores custom agent model choice #841 and fix(ui): honor custom agent model_id when session is at DB default #842 represent — much higher signal than another behavioral test.
  • Cache-key consistency pin (test_cache_hit_on_second_turn_for_setdefault_agent) catches the subtle fix(ui): honor custom agent model_id when session is at DB default #842 follow-up regression by checking both object identity AND the stored key, not just call counts — the right level of rigor for a cache invariant.
  • _effective_model uses explicit None check, and the docstring explains why (empty-string vs missing) — exactly the kind of non-obvious WHY that warrants a comment.
  • Non-streaming and streaming paths share the helper, so both code paths move in lockstep — no drift risk.

Verdict

Approve with suggestions. No blocking issues; the two suggested one-line changes (asyncio.run, drop the _DB_DEFAULT_MODEL alias) are drive-by cleanups that can be applied or ignored without affecting correctness.

kovtcharov and others added 2 commits April 22, 2026 18:22
#817)

## Summary

One-line fix: swap the failing `www.cs.cmu.edu/~tom/EMNLP2004_final.pdf`
URL in `docs/plans/email-triage-agent.mdx:2601` for the canonical ACL
Anthology record at [W04-3240](https://aclanthology.org/W04-3240/). The
CMU URL fails DNS resolution in CI (see [recent
run](https://github.com/amd/gaia/actions/runs/24595902571/job/72072156929)),
breaking the ``Verify external URLs`` check for every open PR that
touches docs. ACL Anthology is the permanent archive for ACL/EMNLP
papers — stable URL, no more link rot.

Also restored the paper's actual full title ("Learning to Classify Email
into 'Speech Acts'") for consistency with the other full-title citations
in the same references list.

## Test plan

- [x] `curl -sI https://aclanthology.org/W04-3240/` returns 200
- [ ] After merge, `Verify external URLs` check should go green on
downstream PRs
@github-actions github-actions Bot added documentation Documentation changes mcp MCP integration changes labels Apr 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Summary

Targeted, well-tested fix for #841. The core insight — kwargs.setdefault only fires when the key is absent, so the pre-fix code's model_id=<session default> unconditionally defeated it — is clearly captured in code, comments, and tests. The refactor into _build_create_kwargs() + _effective_model() is small, local, and readable; the three-branch precedence (custom_model > session-explicit > omit) is sound. Test coverage is excellent: unit tests pin each branch, an integration test proves the full HTTP path, and two static source-grep guards pin against re-introducing either the #841 or the #842 cache-key antipattern — a nice touch that most regression tests lack.

The single most important thing to know: the follow-up commit that reverted _store_agent back to the pre-construction model_id is load-bearing — without it, custom agents rebuild every turn (cache miss). The test suite locks this down correctly, but it's the subtle part of the PR.

Issues Found

🟢 Minor — SESSION_DEFAULT_MODEL is still duplicated inline in SCHEMA_SQL (src/gaia/ui/database.py:25, :46)

You correctly hoisted the literal into a module-level constant and left a comment that it's "kept in sync with the SQL schema DEFAULT". Since SCHEMA_SQL is a plain Python string, an f-string keeps the sync mechanical rather than aspirational:

SESSION_DEFAULT_MODEL = "Qwen3.5-35B-A3B-GGUF"

SCHEMA_SQL = f"""
-- Global document library
CREATE TABLE IF NOT EXISTS documents (
    id TEXT PRIMARY KEY,
    filename TEXT NOT NULL,
    filepath TEXT NOT NULL,
    file_hash TEXT UNIQUE NOT NULL,
    file_size INTEGER DEFAULT 0,
    chunk_count INTEGER DEFAULT 0,
    indexed_at TEXT DEFAULT (datetime('now')),
    last_accessed_at TEXT
);

-- Sessions (conversations)
CREATE TABLE IF NOT EXISTS sessions (
    id TEXT PRIMARY KEY,
    title TEXT NOT NULL DEFAULT 'New Chat',
    created_at TEXT DEFAULT (datetime('now')),
    updated_at TEXT DEFAULT (datetime('now')),
    model TEXT NOT NULL DEFAULT '{SESSION_DEFAULT_MODEL}',
    system_prompt TEXT
);
"""

Not blocking — the comment is enough for now — but an f-string eliminates the drift class entirely. (The rest of the codebase has ~20 duplications of this literal, out of scope for this PR.)

🟢 Minor — _DB_DEFAULT_MODEL alias adds a second name for the same constant (src/gaia/ui/_chat_helpers.py:77)

The alias is only used three times (the elif and two log messages). It's genuinely not helping readability: model_id != SESSION_DEFAULT_MODEL and "session at DB default %s" % SESSION_DEFAULT_MODEL read just as naturally, and one fewer name means one less thing for a future reader to grep. Consider dropping the alias and using SESSION_DEFAULT_MODEL directly.

Not blocking.

🟢 Minor — asyncio.get_event_loop().run_until_complete(coro) is deprecated when there's no running loop (tests/unit/chat/ui/test_chat_helpers_model_resolution.py:26)

Python 3.12 already emits a DeprecationWarning, and 3.14 will likely fail. asyncio.run(coro) is the modern spelling and already used in tests/unit/chat/ui/test_tunnel.py:74. There's precedent for both patterns in tests/ (test_history_limits.py uses the old form), so this is more of a "while you're here" — but the newer tests shouldn't propagate the older idiom.

def _run_sync(coro):
    return asyncio.run(coro)

Strengths

  • Root-cause fix, not a patch over symptoms. The docstring on _build_create_kwargs explicitly explains why omitting the kwarg (not setting it to None) is the correct lever. That's the kind of comment that pays dividends during future debugging.
  • Static source-grep regression guards (test_no_direct_model_id_kwarg_in_create_agent_calls, test_no_effective_model_in_store_agent_calls) are a lightweight but extremely high-signal way to pin two distinct antipatterns. They'll catch future reintroductions in <5 ms with a clear error message — great example of defense-in-depth testing.
  • Post-construction pre-flight via _effective_model preserves the 100–900 s silent-hang protection for the new "omit" code path. Nicely thought through — easy to miss.
  • _effective_model uses an explicit is None check (not or) and the docstring calls out why (empty-string model_id would silently load the wrong model). This is the kind of defensive precision that prevents a future footgun.
  • Integration test TestCustomAgentModelChoice uses a real on-disk custom agent under a patched HOME, exercising the full registry discovery → HTTP → create_agent path. Much higher signal than a pure unit test.
  • Cache-key regression pin (test_cache_hit_on_second_turn_for_setdefault_agent) locks down the fix(ui): honor custom agent model_id when session is at DB default #842 regression with four independent assertions (call count, object identity, stored key, agent's own model_id).

Verdict

Approve with suggestions — the fix is correct, well-scoped, and thoroughly tested. None of the three 🟢 issues block merging; apply them opportunistically.

@itomek
itomek added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 3177a18 Apr 23, 2026
35 checks passed
@itomek
itomek deleted the 841-bug-gaia-agentui-ignores-custom-agent-model-choice branch April 23, 2026 21:59
@itomek itomek mentioned this pull request Apr 23, 2026
5 of 6 tasks
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Apr 24, 2026
# GAIA v0.17.4 Release Notes

GAIA v0.17.4 is a patch release covering two correctness fixes in the
Agent UI custom-agent path, a null-safety fix in the C++ library for
smaller LLMs, and a broken docs citation.

**Why upgrade:**
- **Custom agents use their declared model** — If a custom agent sets a
model via `kwargs.setdefault("model_id", ...)`, the Agent UI now
respects that setting when the session is at the DB default, instead of
falling back to the session model.
- **Compatibility with smaller LLMs in the C++ library** — The C++ JSON
parser now tolerates `null` values in `"tool"` and `"content"` fields,
which some smaller models emit in place of omitting the field.

---

## What's New

### Custom Agent `model_id` Respected in the Agent UI

`_chat_helpers.py` previously passed `model_id=<session model>`
explicitly to `registry.create_agent()`, which defeated
`kwargs.setdefault("model_id", ...)` in custom agents — `setdefault`
only fires when the key is absent (PR
[amd#841](amd#841)). The Agent UI now builds
`create_kwargs` conditionally, omitting `model_id` when the session is
at the DB default so the agent's `__init__` setdefault governs.
Three-branch precedence is now explicit: `custom_model` setting >
session-explicit model > agent's own `setdefault`.

A follow-up fix (PR [amd#842](amd#842))
restored the pre-construction `model_id` as the agent-cache key. The
initial PR amd#841 landing had switched `_store_agent` to use the
post-construction `_effective_model(agent, model_id)` while
`_get_cached_agent` still looked up with `model_id`, so keys never
matched for custom-model agents and the agent was rebuilt on every turn.
A two-turn cache-hit regression test and a static guard on
`_store_agent` call sites were added alongside the fix.

Supporting refactor: extracted `_build_create_kwargs()` and
`_effective_model()` helpers in `src/gaia/ui/_chat_helpers.py` to
deduplicate the three-branch logic across streaming and non-streaming
paths, and exported `SESSION_DEFAULT_MODEL` from `database.py` as the
single source of truth.

---

### C++ Library: Null-Safety in LLM Response Parsing

`parseLlmResponse()` in `cpp/src/json_utils.cpp` now guards
`.get<std::string>()` calls on the `"tool"` and `"answer"` JSON fields
with `.is_string()` / `.is_null()` checks (PR
[amd#780](amd#780)). This fixes a crash
(`json.exception.type_error.302: type must be string, but is null`) when
smaller LLMs (for example `qwen3.5:9b`) return `null` for those fields
instead of omitting them. `json.contains()` returns `true` for `null`
values, so the existing presence checks were insufficient.

---

## Bug Fixes

- **Email-triage agent plan: broken CMU citation link** (PR
[amd#817](amd#817)) — Swapped the failing
`www.cs.cmu.edu/~tom/EMNLP2004_final.pdf` URL in
`docs/plans/email-triage-agent.mdx` for the canonical ACL Anthology
record at [W04-3240](https://aclanthology.org/W04-3240/). The CMU URL
was failing DNS resolution in CI, breaking the `Verify external URLs`
check on every open docs PR. Restored the paper's full title ("Learning
to Classify Email into 'Speech Acts'") for consistency with other
citations in the same references list.

---

## Full Changelog

**5 commits** since v0.17.3:

- `8fc43f3f` — fix(cpp): add null-safety checks for JSON string fields
in LLM response parsing (amd#780)
- `62722de2` — fix(ui): honor custom agent model_id when session is at
DB default (amd#841)
- `4acfd400` — fix(ui): extract _build_create_kwargs/_effective_model,
import SESSION_DEFAULT_MODEL
- `8f5c7621` — fix(ui): restore intent-key for agent cache store to fix
miss regression (amd#842)
- `a0fdb109` — docs(plans): fix broken CMU link to EMNLP 2004 Email
Speech Acts paper (amd#817)

Full Changelog:
[v0.17.3...v0.17.4](amd/gaia@v0.17.3...v0.17.4)

---

## Release checklist
- [x] `util/validate_release_notes.py docs/releases/v0.17.4.mdx --tag
v0.17.4` passes
- [x] `src/gaia/version.py` → `0.17.4`
- [x] `src/gaia/apps/webui/package.json` → `0.17.4`
- [x] Navbar label in `docs/docs.json` → `v0.17.4 · Lemonade 10.0.0`
- [x] All 5 commits in the range (v0.17.3..HEAD) are represented in the
notes
- [ ] Review from @kovtcharov-amd addressed

---------

Co-authored-by: Tomasz Iniewicz <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 26, 2026
…865)

## Summary

Gemma-4-E4B-it-GGUF becomes GAIA's default model for all roles (LLM,
VLM, installer profiles, CLI, Agent UI, eval, EMR). Simultaneously
inverts the tool-call priority chain so native OpenAI `tool_calls` is
the primary path, with embedded-JSON format falling back only for legacy
non-tool-calling models. Also bumps the minimum Lemonade version to
v10.1.0 (which moved its default port from 8000 → 13305 and is where
Gemma 4 support was added).

This ships on top of the existing UI model-resolution fixes (#841,
#842). Resolves #863.

## What changed and why

- **Universal Gemma default** — Gemma 4 E4B is natively multimodal
(~4.5B effective params, 128K context, Apache 2.0), making it the right
single default across the LLM/VLM split that previously required two
different models. Footprint drops 19.7 GB → 5 GB.
- **Native tool_calls path** (Lemonade v10.1.0+ `--jinja`) — GAIA now
passes `tools=[...]` to Lemonade for tool-capable models. The response
comes back as native `tool_calls`; `LemonadeProvider.chat()` encodes
them as a sentinel JSON string (`{"__tool_calls__": ...}`) so no callers
need a type change. `_parse_llm_response` detects the sentinel and
returns the unified `{"tool": ..., "tool_args": ...}` dict.
- **System-prompt gating** — The embedded-JSON format block
(`_PLANNING_FORMAT`/`_CONVERSATIONAL_FORMAT`) is excluded from the
composed system prompt for tool-calling models; it actively prevented
native `tool_calls` in prior testing.
- **Startup validator** — `_validate_profile_model_registry()` raises at
import time if any `AGENT_PROFILES` entry references a model key not in
`MODELS`.
- **Lemonade v10.1.0+ / port 13305** — `DEFAULT_PORT` flipped from 8000
to 13305 (Lemonade's [spring-cleaning
release](https://github.com/lemonade-sdk/lemonade/wiki/Migration#v10x---v101)
changed the default). 75 files updated (agents, UI, MCP bridge, RAG SDK,
VLM, CLI, tests, docs). `min_lemonade_version = 10.1.0` everywhere
`INIT_PROFILES` is declared.
- **Eval baselines** — Pre-swap Qwen3.5-35B baseline at commit
`3b51ca92` and post-swap Gemma-4-E4B baseline both committed under
`tests/fixtures/eval_baselines/`; Gemma outperforms Qwen 14/15 vs 13/15
(see comment below for per-scenario breakdown).

## Test plan

- [x] `python -m pytest tests/unit/ --ignore=tests/unit/chat/ui/ -q` →
928 passed, 16 skipped
- [x] `python -m pytest tests/unit/test_tool_call_priority.py -v` → 23
passed (sentinel detection, native branch parsing, edge cases, prompt
gating, startup validator)
- [x] `python util/lint.py --black --isort --flake8` → all pass
- [x] Eval against Gemma-4-E4B on Lemonade v10.2.0, Sonnet judge → 14/15
scenarios pass, beats Qwen baseline (see comment)
- [x] Verified `claude -p --model claude-sonnet-4-6` was actually the
judge (not Opus) via `modelUsage` in test subprocess

## Open follow-ups (not blockers for this PR)

- `tool_selection/known_path_read` regression: Gemma doesn't discover
indexed-internal-copy fallback path in Turn 1 after Access-Denied on the
original. Prompt-engineering candidate.
- `/api/system/status` reports the catalog `ctx_size` even when Lemonade
loaded the model with a smaller window. Surface a warning when they
diverge; a whole eval run was wasted due to this mask.

---------

Co-authored-by: Tomasz Iniewicz <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov added a commit that referenced this pull request Apr 26, 2026
Bring this branch up to date with the v0.17.4 release window on main,
including the model-id resolution fixes (#841/#842) that overlap our
Settings Active-Model thread.

Conflict resolution (single file, two call sites in _chat_helpers.py):
both branches changed the registry.create_agent() invocation. Main
introduced _build_create_kwargs() to handle custom_model + DB-default
model omission for #841/#842; this branch added _session_agent_kwargs()
to forward rag_documents/library_documents/allowed_paths/ui_session_id
into registry-built agents. The two helpers have disjoint key sets,
so the resolution is to expand both: model_id/silent_mode/debug from
_build_create_kwargs, session context from _session_agent_kwargs.

The regex shape-test in test_chat_helpers.py was anchored on the old
"model_id=model_id, streaming=True" prefix; reanchored to the
streaming=True ... _session_agent_kwargs( pattern to track the new
call-site shape.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes mcp MCP integration changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: GAIA AgentUI ignores custom agent model choice

4 participants