feat: allow custom provider capability overrides#8942
feat: allow custom provider capability overrides#8942MestreY0d4-Uninter wants to merge 2 commits into
Conversation
5efc0a0 to
dba2384
Compare
|
Validation / CI note: Local validation for the actual change set is green:
Current CI red does not appear to be evidence that this PR regressed the repo:
So at this point the red checks look like broad-repo / operational noise, not a targeted regression from this custom-provider capability patch. |
|
Refresh rebuilt from origin/main and pushed to refresh/8942. Validation: py_compile on changed .py files passed; focused pytest on changed test files ran and hit one existing failure in tests/run_agent/test_run_agent.py::TestStreamingApiCall::test_tool_call_accumulation (expected web_search, got search). |
|
Additional validation note: The one extra focused failure I hit while checking this refreshed branch is reproducible on clean
|
|
✅ Audit completed (2026-04-19)
Baseline Noise Note: Test failures reproduce on clean Recommendation: DECISION NEEDED — Feature adds custom provider capability overrides. Question for maintainers: Is manual capability override still needed?
Feature value: Allows users to manually override provider capabilities (e.g., force a model to support vision or tools). Part of batch audit: 23 PRs audited, 2 closed (absorbed), 21 refreshed |
|
🔔 Ready for maintainer review Esta PR foi validada como parte da auditoria completa de 2026-04-19. Status:
Ação necessária: Review e merge (ou decisão de feature para #9209, #8942). Audit batch 3: 4 PRs com validação mínima concluída |
dba2384 to
e6c3098
Compare
d0fe8aa to
161594c
Compare
|
Audit/update 2026-04-25:
This was part of the open-PR cleanup pass against current upstream/main. |
|
CI follow-up from the 2026-04-25 cleanup pass:
So this PR is not merge-ready as-is despite the minimal fix and attribution pass. Next step would be a clean rebase/reconstruction onto current |
161594c to
07a8f3f
Compare
|
Refreshed this PR onto current Current PR scope remains limited to custom-provider capability overrides:
Validation:
The remaining broad |
|
Closing this for now. Provider capability overrides are a broader config/model-switching feature, and this branch now conflicts in config/model-switch tests. It should be rebuilt from current main if still desired. |
Summary
custom_providers[].models.<model>.capabilitiesto override model metadata for private/custom endpoints/modelswitch pipeline, including synthetic capability metadata when models.dev has no entrycustom_providersreasoning overrides for custom endpoints, and document the new config shapeWhat this adds
Supported per-model capability keys under
custom_providers:visionreasoningtoolsstreamingExample:
Behavior
custom_providersper-model overrides over catalog metadata/modelcan show capability info even for custom/private models that are absent from models.devAIAgent._supports_reasoning_extra_body()now respectscustom_providersper-modelreasoningoverrides matched by activebase_url+ modelTest plan
python3 -m py_compile agent/models_dev.py hermes_cli/config.py hermes_cli/model_switch.py run_agent.py tests/agent/test_models_dev.py tests/hermes_cli/test_config_validation.py tests/hermes_cli/test_model_switch_custom_providers.py tests/run_agent/test_run_agent.pyuv run pytest tests/agent/test_models_dev.py tests/hermes_cli/test_config_validation.py tests/hermes_cli/test_model_switch_custom_providers.py -o addopts='' -quv run pytest tests/run_agent/test_run_agent.py::TestBuildApiKwargs::test_reasoning_sent_for_custom_provider_capability_override tests/run_agent/test_run_agent.py::TestBuildApiKwargs::test_reasoning_override_matches_custom_provider_base_url_not_name -o addopts='' -qCloses #8731.