How provider routing works
masterThe system uses a "Thin Gateway" pattern to route requests through three layers:
- ProviderFactory: Resolves the logical identity (e.g.,
gemini,atlas) from the/v1/chat/completionsendpoint. - Provider: Represents the logical LLM vendor (e.g.,
GeminiProvider). It handles vendor-specific logic like tool parsing and prompt transformation. - Adapter: The execution strategy (e.g.,
PlaywrightorWebAPI). It handles the technical implementation of driving a browser or calling a REST API.
Routing via Model Namespaces:
To select a browser-native provider, use provider-aware model namespaces in the format: playwright/<provider>/<model>.
Example: playwright/gemini/gemini-1.5-pro