Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ config.yaml.bak
/frontend/playwright-report/
.gstack/
.worktrees

# Agent plans
.agents/plans/
14 changes: 8 additions & 6 deletions backend/packages/harness/deerflow/runtime/runs/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,14 @@ async def run_agent(
# _resolve_model_name in agent.py may return the default model if the
# requested name is not in the allowlist — this update ensures the
# persisted model_name reflects the actual model used.
if record.model_name is not None:
resolved = getattr(agent, "metadata", {}) or {}
if isinstance(resolved, dict):
effective = resolved.get("model_name")
if effective and effective != record.model_name:
await run_manager.update_model_name(record.run_id, effective)
# NOTE: Removed the "record.model_name is not None" guard so that runs
# created without an explicit model_name (which leaves it as None) still
# get their resolved effective model persisted to the database.
resolved = getattr(agent, "metadata", {}) or {}
if isinstance(resolved, dict):
effective = resolved.get("model_name")
if effective:
await run_manager.update_model_name(record.run_id, effective)
Comment on lines +237 to +244

# 4. Attach checkpointer and store
if checkpointer is not None:
Expand Down
Loading