Discover external assistant agents from models endpoint
Merged
JJ
2mo ago+600+600+012345678901234567890123456789-73-73-01234567890123456789
Summary
- discover available external agents from the authenticated sibling
/v1/modelsendpoint - require users to select a returned agent and send its ID verbatim as the chat-completions
model - keep the external gateway in control of the underlying LLM while retaining the legacy routing-header override
- add an External AI information panel, configuration docs, environment examples, and regression coverage
Test plan
PARALLEL_WORKERS=1 bundle exec rails test test/models/assistant/external/model_catalog_test.rb test/models/assistant/external/client_test.rb test/models/assistant/external_config_test.rb test/controllers/settings/hostings_controller_test.rbbundle exec rubocop app/controllers/settings/hostings_controller.rb app/models/assistant/external.rb app/models/assistant/external/client.rb app/models/assistant/external/model_catalog.rb app/models/setting.rb test/controllers/settings/hostings_controller_test.rb test/models/assistant/external/client_test.rb test/models/assistant/external_config_test.rb test/models/assistant/external/model_catalog_test.rbbundle exec erb_lint app/views/settings/hostings/_assistant_settings.html.erb- visually verified
/settings/hostingin self-hosted mode with a local gateway returning multiple agent IDs
Summary by CodeRabbit
- New Features
- External assistant settings let you choose a model discovered through the configured gateway. The selected model is validated, and discovery or loading errors are shown in settings.
- Settings include guidance about endpoint configuration, model discovery, routing, and request errors.
- Configuration
- External assistant requests use the selected model, defaulting to
openclaw/mainwhen none is selected. The legacy agent ID is used only when no model is selected. - When a changed endpoint does not offer the current model, settings ask you to select another.
- External assistant requests use the selected model, defaulting to
- Documentation
- Added setup guidance for the external chat assistant, including required configuration and streaming support.