Skip to content

feat(config): auto-migrate deprecated [llm] to [agent.llm]#142

Open
Shearerbeard wants to merge 1 commit into
mainfrom
mshearer/141-auto-migrate-legacy-llm
Open

feat(config): auto-migrate deprecated [llm] to [agent.llm]#142
Shearerbeard wants to merge 1 commit into
mainfrom
mshearer/141-auto-migrate-legacy-llm

Conversation

@Shearerbeard
Copy link
Copy Markdown
Collaborator

@Shearerbeard Shearerbeard commented May 14, 2026

Summary

  • Old configs with top-level [llm] now auto-migrate to [agent.llm] at load time instead of failing
  • Deprecation warning logged so users know to update
  • Ambiguous configs (both [llm] and [agent.llm]) and missing [agent] still fail with clear errors
  • Quickstart example config updated to new shape

@Shearerbeard Shearerbeard requested a review from a team May 14, 2026 16:40
@promptless
Copy link
Copy Markdown

promptless Bot commented May 14, 2026

Promptless prepared a documentation update related to this change.

Triggered by mezmo/aura#142

Updated docs/breaking-changes/20260421-llm-under-agent.md to reflect the auto-migration behavior: changed the summary to indicate configs are auto-migrated with a deprecation warning, added the exact warning message users will see, and documented the two cases that still fail (ambiguous configuration and missing [agent] section).

Review: Update LLM migration docs for auto-migration behavior

@andrewelizondo
Copy link
Copy Markdown
Collaborator

A few small suggestions from a review pass:

  1. Stale doc comment on migrate_legacy_top_level_llm: the doc still frames the function as emitting a migration error ("Detect the legacy top-level [llm] table shape and emit a migration error") and the second paragraph explains the silent-ignore rationale that predates this PR. Worth rewriting to reflect that it now auto-migrates and only errors on ambiguous / missing-[agent] cases.

  2. Missing test for [llm.additional_params] migration: the previous hard-error message specifically called out [llm.additional_params] as a thing users have, and it's a common shape (temperature, max_tokens, etc.). Since the whole toml::Value is moved it should migrate correctly, but there's no test asserting it does. A regression here would be easy to miss — the renamed test_legacy_top_level_llm_migrated_with_warning only checks api_key and model.

  3. Pin a removal version in the deprecation warning: the current message says "this fallback will be removed in a future release" without a target. Naming a version (e.g. "removed in v1.22") makes the deprecation actionable for users reading the warning in logs.

@Shearerbeard Shearerbeard force-pushed the mshearer/141-auto-migrate-legacy-llm branch from 678835a to ff1b146 Compare May 14, 2026 20:38
Replace the hard error for legacy top-level [llm] configs with runtime
auto-migration into [agent.llm]. Logs a deprecation warning so users
know to update their TOML. Ambiguous configs (both present) and configs
missing [agent] entirely still fail with clear errors.

Fixes: #141
@Shearerbeard Shearerbeard force-pushed the mshearer/141-auto-migrate-legacy-llm branch from ff1b146 to 600b84a Compare May 15, 2026 14:52
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.

2 participants