mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
docs: clarify OpenRouter configuration (#1123)
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -94,8 +94,16 @@ DeerFlow has newly integrated the intelligent search and crawling toolset indepe
|
|||||||
api_key: $OPENAI_API_KEY # API key (recommended: use env var)
|
api_key: $OPENAI_API_KEY # API key (recommended: use env var)
|
||||||
max_tokens: 4096 # Maximum tokens per request
|
max_tokens: 4096 # Maximum tokens per request
|
||||||
temperature: 0.7 # Sampling temperature
|
temperature: 0.7 # Sampling temperature
|
||||||
|
|
||||||
|
- name: openrouter-gemini-2.5-flash
|
||||||
|
display_name: Gemini 2.5 Flash (OpenRouter)
|
||||||
|
use: langchain_openai:ChatOpenAI
|
||||||
|
model: google/gemini-2.5-flash-preview
|
||||||
|
api_key: $OPENAI_API_KEY # OpenRouter still uses the OpenAI-compatible field name here
|
||||||
|
base_url: https://openrouter.ai/api/v1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
OpenRouter and similar OpenAI-compatible gateways should be configured with `langchain_openai:ChatOpenAI` plus `base_url`. If you prefer a provider-specific environment variable name, point `api_key` at that variable explicitly (for example `api_key: $OPENROUTER_API_KEY`).
|
||||||
|
|
||||||
4. **Set API keys for your configured model(s)**
|
4. **Set API keys for your configured model(s)**
|
||||||
|
|
||||||
@@ -107,6 +115,7 @@ DeerFlow has newly integrated the intelligent search and crawling toolset indepe
|
|||||||
```bash
|
```bash
|
||||||
TAVILY_API_KEY=your-tavily-api-key
|
TAVILY_API_KEY=your-tavily-api-key
|
||||||
OPENAI_API_KEY=your-openai-api-key
|
OPENAI_API_KEY=your-openai-api-key
|
||||||
|
# OpenRouter also uses OPENAI_API_KEY when your config uses langchain_openai:ChatOpenAI + base_url.
|
||||||
# Add other provider keys as needed
|
# Add other provider keys as needed
|
||||||
INFOQUEST_API_KEY=your-infoquest-api-key
|
INFOQUEST_API_KEY=your-infoquest-api-key
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ models:
|
|||||||
- DeepSeek (`langchain_deepseek:ChatDeepSeek`)
|
- DeepSeek (`langchain_deepseek:ChatDeepSeek`)
|
||||||
- Any LangChain-compatible provider
|
- Any LangChain-compatible provider
|
||||||
|
|
||||||
For OpenAI-compatible gateways (for example Novita), keep using `langchain_openai:ChatOpenAI` and set `base_url`:
|
For OpenAI-compatible gateways (for example Novita or OpenRouter), keep using `langchain_openai:ChatOpenAI` and set `base_url`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
models:
|
models:
|
||||||
@@ -40,8 +40,17 @@ models:
|
|||||||
extra_body:
|
extra_body:
|
||||||
thinking:
|
thinking:
|
||||||
type: enabled
|
type: enabled
|
||||||
|
|
||||||
|
- name: openrouter-gemini-2.5-flash
|
||||||
|
display_name: Gemini 2.5 Flash (OpenRouter)
|
||||||
|
use: langchain_openai:ChatOpenAI
|
||||||
|
model: google/gemini-2.5-flash-preview
|
||||||
|
api_key: $OPENAI_API_KEY
|
||||||
|
base_url: https://openrouter.ai/api/v1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your OpenRouter key lives in a different environment variable name, point `api_key` at that variable explicitly (for example `api_key: $OPENROUTER_API_KEY`).
|
||||||
|
|
||||||
**Thinking Models**:
|
**Thinking Models**:
|
||||||
Some models support "thinking" mode for complex reasoning:
|
Some models support "thinking" mode for complex reasoning:
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,17 @@ models:
|
|||||||
# thinking:
|
# thinking:
|
||||||
# type: enabled
|
# type: enabled
|
||||||
|
|
||||||
|
# Example: OpenRouter (OpenAI-compatible)
|
||||||
|
# OpenRouter models use the same ChatOpenAI + base_url pattern as other OpenAI-compatible gateways.
|
||||||
|
# - name: openrouter-gemini-2.5-flash
|
||||||
|
# display_name: Gemini 2.5 Flash (OpenRouter)
|
||||||
|
# use: langchain_openai:ChatOpenAI
|
||||||
|
# model: google/gemini-2.5-flash-preview
|
||||||
|
# api_key: $OPENAI_API_KEY
|
||||||
|
# base_url: https://openrouter.ai/api/v1
|
||||||
|
# max_tokens: 8192
|
||||||
|
# temperature: 0.7
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Tool Groups Configuration
|
# Tool Groups Configuration
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user