mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
docs: add support for openrouter
This commit is contained in:
@ -278,6 +278,22 @@ key = "..." # your Codestral api key
|
||||
|
||||
(you can obtain a Codestral key from [here](https://console.mistral.ai/codestral))
|
||||
|
||||
### Openrouter
|
||||
|
||||
To use model from Openrouter, for example, set:
|
||||
|
||||
```toml
|
||||
[config] # in configuration.toml
|
||||
model="openrouter/anthropic/claude-3.7-sonnet"
|
||||
fallback_models=["openrouter/deepseek/deepseek-chat"]
|
||||
custom_model_max_tokens=20000
|
||||
|
||||
[openrouter] # in .secrets.toml or passed an environment variable openrouter__key
|
||||
key = "..." # your openrouter api key
|
||||
```
|
||||
|
||||
(you can obtain an Openrouter API key from [here](https://openrouter.ai/settings/keys))
|
||||
|
||||
### Custom models
|
||||
|
||||
If the relevant model doesn't appear [here](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/algo/__init__.py), you can still use it as a custom model:
|
||||
|
@ -111,3 +111,4 @@ api_base = "" # Your Azure OpenAI service base URL (e.g., https://openai.xyz.co
|
||||
|
||||
[openrouter]
|
||||
key = ""
|
||||
api_base = ""
|
Reference in New Issue
Block a user