The _create_provider_instance method had two ProviderType.OPENROUTER
branches. The first (lines 574-598) ran first, returning without
sanitizing numeric header keys. The second (correct) branch at lines
627-652 — which coerces all header keys/values to str — was dead code
and never reached.
Fix: remove the first (broken) branch so the sanitizing branch executes.
Also add _create_provider_llm as a thin wrapper around
_create_provider_instance. Three scenarios in
openrouter_provider_registry.feature called this method and received
AttributeError because it did not exist.
Fixes: features/openrouter_provider_registry.feature:19,27,35 (errored)
features/provider_registry_coverage_boost.feature:48 (failed)
The openrouter_provider_registry_steps.py file called use_step_matcher("re")
at module level without restoring the default "parse" matcher at the end.
This caused all step files loaded alphabetically after it (provider_registry_*,
resource_*, session_*, etc.) to use the regex matcher instead of the parse
matcher, breaking their {value}-style step patterns and causing unit_tests CI
failures.
Add use_step_matcher("parse") at the end of the file to restore the default
matcher after the openrouter step definitions are registered.
Added handling for ProviderType.OPENROUTER in _create_provider_llm in src/cleveragents/providers/registry.py to resolve ValueError: Unsupported provider type when using OpenRouter via create_llm.
Created features/openrouter_provider_registry.feature with 11 scenarios validating OpenRouter provider behavior in ProviderRegistry.
Created features/steps/openrouter_provider_registry_steps.py with step definitions for the new feature file.
Created docs/reference/providers.md with comprehensive documentation including the OpenRouter configuration guide.
ISSUES CLOSED: #8907