You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
resolve_model_provider raises AttributeError when a legacy custom_providers row has a non-string name #9328
resolve_model_provider() raises AttributeError: 'int' object has no attribute 'strip' when a legacy custom_providers row has a non-string name (for example name: 5 in YAML). The model and base_url fields have the same pattern.
The failing reads are in the legacy-row loop, api/config.py:3720-3722 on master d49955dce91f:
The resolver bug isn't new. Since v0.52.742, though, the default-model save reaches it: when the provider id isn't declared, the save resolves the model with an @<built-in>: hint and hits the loop. The Agent's own legacy-row reader skips a row whose name or base_url isn't a string.
Fix shape
In those reads, treat a non-string value as absent, e.g. str(entry.get('name') or '').strip() only when it's a str, otherwise ''. That skips the row the way the Agent does. Add a test with a non-string name, model and base_url through resolve_model_provider() and set_hermes_default_model().
Found during the #9324 regression gate. It's out of scope for #9324.
Activity
test(config): cover slash-form scan with non-string legacy fields
fix(config): treat non-string custom_providers fields as absent every…
fix(config): gate endpoint ownership on the string-only identity rule (…