# Models and keys > The agent harness runs on your own model key. This page lists the providers it accepts, the variable each key is read from, and the models each preset offers. Harny does not choose your agent's model and never sees your key. The SDK reads the key from the provider's usual variable, or you pass it as `api_key=` together with `provider=`. The Memory API needs no model at all: recall returns ranked evidence as JSON, and your own model writes the answer. ## Providers | Provider | `provider=` | Key variable | Wire style | Presets that list it | |---|---|---|---|---| | Zhipu GLM | `zhipu` | `ZAI_API_KEY` | chat-completions | `cost_first`, `quality_first` | | DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` | chat-completions | `cost_first` | | OpenAI | `openai` | `OPENAI_API_KEY` | chat-completions | `cost_first`, `quality_first`, `regulated` | | Google Gemini | `google` | `GEMINI_API_KEY`, `GOOGLE_API_KEY` | generate-content | `cost_first`, `quality_first`, `regulated` | | OpenRouter | `openrouter` | `OPENROUTER_API_KEY` | chat-completions | `cost_first`, `quality_first` | | Anthropic Claude | `anthropic` | `ANTHROPIC_API_KEY` | messages | `cost_first`, `quality_first`, `regulated` | `provider=` (or `HARNY_MODEL_PROVIDER`) pins one provider. Without it the harness takes the first entry of the preset for which it finds a key in the environment. A key passed as `api_key=` needs `provider=`, so a key is never sent to the wrong provider. Anthropic's endpoint can reach Harny's tools as a remote MCP server. With every other provider the harness calls Harny's tools from the client side. ## Presets and their models A preset is an ordered list of models. The list is read from Harny's model roster at start, so a model change reaches your agent without a code change on your side. Set the preset with `preset=` in `AgentConfig`. The lists are in roster order, not a ranking. | Preset | Provider | Model | |---|---|---| | `cost_first` | `openrouter` | `z-ai/glm-5.3-flash` | | `cost_first` | `zhipu` | `glm-5.3-flash` | | `cost_first` | `deepseek` | `deepseek-flash` | | `cost_first` | `openai` | `gpt-5-nano` | | `cost_first` | `google` | `gemini-2.5-flash-lite` | | `cost_first` | `anthropic` | `claude-sonnet-5` | | `quality_first` | `zhipu` | `glm-5.3` | | `quality_first` | `openrouter` | `z-ai/glm-5.3` | | `quality_first` | `openai` | `gpt-5.2` | | `quality_first` | `google` | `gemini-3.1-pro-preview` | | `quality_first` | `anthropic` | `claude-sonnet-5` | | `regulated` | `openai` | `gpt-5-mini` | | `regulated` | `google` | `gemini-2.5-flash` | | `regulated` | `anthropic` | `claude-sonnet-5` | The current roster is also served by `GET /v1/models/roster` with your app key. It is the source of this table. ## Change the model A model swap is one setting on your side: change `preset=`, or `provider=` and the key variable, and run again. Nothing stored in Harny changes, because memory does not depend on the model that reads it. ## Next - [Agent harness overview](/docs/agent-harness/overview) - [Agent harness limits](/docs/agent-harness/limits) - [Memory API limits](/docs/memory-api/limits)