Providers and Auth
Wayland Core ships five engine-native providers: Anthropic, OpenAI (and OpenAI-compatible backends), Google Gemini, AWS Bedrock, and Google Vertex AI. Each one is set in the config file or overridden per run with flags and environment variables.
Anthropic
Section titled “Anthropic”Set a key in config, or pass it at run time:
[default]provider = "anthropic"
[providers.anthropic]# api_key = "sk-ant-xxx" # or set ANTHROPIC_API_KEYYou can also attempt to sign in to a Claude.ai subscription with OAuth instead of a key:
wayland-core --login # device flow, prints a URL and code to enterwayland-core --logout # remove saved OAuth credentialsCredentials are saved next to the global config. Run wayland-core --config-path to find the directory.
OpenAI and compatibles
Section titled “OpenAI and compatibles”The OpenAI provider also drives DeepSeek, Qwen, Ollama, vLLM, and other OpenAI-compatible endpoints. Point base_url at the backend:
[providers.deepseek]provider = "openai"model = "deepseek-chat"api_key = "sk-xxx"base_url = "https://api.deepseek.com"AWS Bedrock
Section titled “AWS Bedrock”Bedrock uses SigV4. Provide explicit credentials, an AWS profile, or let the standard environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) resolve automatically:
[bedrock]region = "us-east-1"# access_key_id = "AKIA..."# secret_access_key = "..."# profile = "my-profile"Google Vertex AI
Section titled “Google Vertex AI”Vertex uses GCP OAuth2. Supply a service account key file, use Application Default Credentials from gcloud, or rely on the metadata server on GCE, GKE, and Cloud Run:
[vertex]project_id = "my-gcp-project"region = "us-central1"credentials_file = "/path/to/service-account.json"Manage keys from the CLI
Section titled “Manage keys from the CLI”The auth subcommand reads and writes provider keys in the config, validating each key against the provider endpoint before it is saved:
wayland-core auth list # show configured providers, keys maskedwayland-core auth add anthropic sk-ant-xxx # validate, then storewayland-core auth add autodetect sk-xxx # infer the provider from the key prefixwayland-core auth remove openai # drop a provider tableFlags and environment variables
Section titled “Flags and environment variables”Any single run can override the config. Flags win over environment variables, which win over the files:
wayland-core --provider openai --model gpt-4o --api-key sk-xxx "Summarize this repo"The engine also reads PROVIDER, API_KEY, BASE_URL, and MODEL, plus provider-native keys like ANTHROPIC_API_KEY and OPENAI_API_KEY.
Request-shape routing
Section titled “Request-shape routing”The engine classifies each request into a routing tier before sending it to the provider. The tier is stamped onto the request as a routing_hint (e.g. "premium:large_context") and surfaced in tracing spans; the actual model selected within that tier is the caller’s responsibility.
| Tier | Condition | Reason label |
|---|---|---|
Premium | requires_vision = true | requires_vision |
Premium | input_tokens > 8000 | large_context |
Premium | tool_call_count >= 3 | tool_heavy |
Balanced | code_ratio >= 0.30 | code_heavy |
Cheap | all other requests | simple |