mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-26 23:44:19 +00:00
feat: make agent runner config schema driven
This commit is contained in:
@@ -132,7 +132,7 @@ class TestResolveRunnerConfig:
|
||||
assert config == {'model': 'uuid-123', 'max_round': 10}
|
||||
|
||||
def test_resolve_old_format_config(self):
|
||||
"""Resolve runner config from old format."""
|
||||
"""Runtime config resolver should not read old format."""
|
||||
pipeline_config = {
|
||||
'ai': {
|
||||
'local-agent': {
|
||||
@@ -146,6 +146,23 @@ class TestResolveRunnerConfig:
|
||||
pipeline_config,
|
||||
'plugin:langbot/local-agent/default',
|
||||
)
|
||||
assert config == {}
|
||||
|
||||
def test_resolve_legacy_config_for_migration(self):
|
||||
"""Migration helper should read old format."""
|
||||
pipeline_config = {
|
||||
'ai': {
|
||||
'local-agent': {
|
||||
'model': 'uuid-123',
|
||||
'max_round': 10,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
config = ConfigMigration.resolve_legacy_runner_config(
|
||||
pipeline_config,
|
||||
'plugin:langbot/local-agent/default',
|
||||
)
|
||||
assert config == {'model': 'uuid-123', 'max_round': 10}
|
||||
|
||||
def test_resolve_no_config(self):
|
||||
@@ -228,4 +245,4 @@ class TestGetOldRunnerName:
|
||||
def test_get_old_runner_name_not_mapped(self):
|
||||
"""Get old runner name for unmapped runner ID."""
|
||||
old_name = ConfigMigration.get_old_runner_name('plugin:alice/my-agent/custom')
|
||||
assert old_name is None
|
||||
assert old_name is None
|
||||
|
||||
Reference in New Issue
Block a user