Skip to content

Commit 42ff965

Browse files
committed
feat: add Requesty adapter (OpenAI-compatible)
Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
1 parent f27e126 commit 42ff965

7 files changed

Lines changed: 825 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ All agents now use a **standardized interaction pattern** with structured three-
3939
-**Kimi** (Moonshot AI) - Interactive AI agent with advanced reasoning (interactive-first CLI)
4040
-**OpenCode** (SST) - AI coding agent built for the terminal (non-interactive run mode)
4141
-**OpenRouter** - Unified API access to 400+ models from multiple providers (API-based, no CLI required) 🌐 **API-based**
42+
-**Requesty** - OpenAI-compatible gateway with access to 400+ models from multiple providers (API-based, no CLI required) 🌐 **API-based**
4243
-**Qoder** - Agentic coding platform with enhanced context engineering
4344
-**Qwen** (Alibaba) - Multilingual capabilities
4445
-**Ollama** - Local LLM support (planned)
@@ -317,6 +318,7 @@ AgentPipe supports three formats for specifying agents via the `--agents` / `-a`
317318
| `groq` | ✅ Optional | No | `llama3-70b`, `mixtral-8x7b` |
318319
| `crush` | ✅ Optional | No | `deepseek-r1`, `qwen-2.5` |
319320
| `openrouter` |**Required** | Yes | `anthropic/claude-sonnet-4-5`, `google/gemini-2.5-pro` |
321+
| `requesty` |**Required** | Yes | `openai/gpt-4o-mini`, `anthropic/claude-sonnet-4-5` |
320322
| `kimi` | ❌ Not supported | No | N/A |
321323
| `cursor` | ❌ Not supported | No | N/A |
322324
| `amp` | ❌ Not supported | No | N/A |

cmd/model_validation.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ var agentModelSupport = map[string]ModelSupport{
5959
Supported: true,
6060
Required: true,
6161
},
62+
"requesty": {
63+
Supported: true,
64+
Required: true,
65+
},
6266

6367
// CLI agents without --model support
6468
"kimi": {
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: "1.0"
2+
3+
# Requesty Multi-Agent Conversation Example
4+
#
5+
# This example demonstrates using Requesty's unified, OpenAI-compatible API to
6+
# access multiple AI models from different providers in a single conversation.
7+
#
8+
# Requirements:
9+
# - Set REQUESTY_API_KEY environment variable
10+
# - Requesty account with credits (https://requesty.ai)
11+
#
12+
# Run with:
13+
# export REQUESTY_API_KEY=your-key-here
14+
# agentpipe run -c examples/requesty-conversation.yaml
15+
16+
agents:
17+
- id: claude-via-requesty
18+
type: requesty
19+
name: "Claude (Requesty)"
20+
prompt: "You are Claude, an AI assistant created by Anthropic. You are thoughtful, analytical, and enjoy deep discussions."
21+
announcement: "🤖 Claude has joined via Requesty API!"
22+
model: anthropic/claude-sonnet-4-5
23+
temperature: 0.7
24+
max_tokens: 500
25+
26+
- id: gemini-via-requesty
27+
type: requesty
28+
name: "Gemini (Requesty)"
29+
prompt: "You are Gemini, Google's AI assistant. You are curious, factual, and love to explore new ideas."
30+
announcement: "✨ Gemini has joined via Requesty API!"
31+
model: google/gemini-2.5-flash
32+
temperature: 0.6
33+
max_tokens: 500
34+
35+
- id: gpt-via-requesty
36+
type: requesty
37+
name: "GPT (Requesty)"
38+
prompt: "You are GPT, OpenAI's language model. You are helpful, creative, and enjoy collaborative problem-solving."
39+
announcement: "🧠 GPT has joined via Requesty API!"
40+
model: openai/gpt-4o-mini
41+
temperature: 0.8
42+
max_tokens: 500
43+
44+
orchestrator:
45+
mode: round-robin
46+
max_turns: 8
47+
turn_timeout: 30s
48+
response_delay: 2s
49+
initial_prompt: "Let's have a discussion about the future of AI and its impact on society. Each of you represents a different AI platform - what unique perspectives do you bring to this topic?"
50+
51+
logging:
52+
enabled: true
53+
show_metrics: true

examples/requesty-solo.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: "1.0"
2+
3+
# Requesty Solo Agent Example
4+
#
5+
# This example shows how to use a single Requesty agent for a conversation.
6+
# This is useful for testing or when you want to use a specific model via API
7+
# without installing its CLI tool.
8+
#
9+
# Requirements:
10+
# - Set REQUESTY_API_KEY environment variable
11+
# - Requesty account with credits (https://requesty.ai)
12+
#
13+
# Run with:
14+
# export REQUESTY_API_KEY=your-key-here
15+
# agentpipe run -c examples/requesty-solo.yaml
16+
17+
agents:
18+
- id: gpt-via-requesty
19+
type: requesty
20+
name: "GPT (Requesty)"
21+
prompt: "You are a powerful reasoning assistant. When solving problems, break down your thinking step by step and show your reasoning process clearly."
22+
announcement: "🧪 GPT has joined via Requesty API!"
23+
model: openai/gpt-4o-mini
24+
temperature: 0.5
25+
max_tokens: 2000
26+
27+
orchestrator:
28+
mode: round-robin
29+
max_turns: 3
30+
turn_timeout: 60s
31+
response_delay: 1s
32+
initial_prompt: "Solve this logic puzzle: You have 12 balls that look identical. One ball is slightly heavier or lighter than the others. Using a balance scale only 3 times, how can you identify which ball is different and whether it's heavier or lighter?"
33+
34+
logging:
35+
enabled: true
36+
show_metrics: true

internal/providers/providers.json

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3458,6 +3458,57 @@
34583458
}
34593459
]
34603460
},
3461+
{
3462+
"name": "Requesty",
3463+
"id": "requesty",
3464+
"type": "openai",
3465+
"api_key": "$REQUESTY_API_KEY",
3466+
"api_endpoint": "https://router.requesty.ai/v1",
3467+
"default_large_model_id": "anthropic/claude-sonnet-4-5",
3468+
"default_small_model_id": "openai/gpt-4o-mini",
3469+
"models": [
3470+
{
3471+
"id": "openai/gpt-4o-mini",
3472+
"name": "OpenAI: GPT-4o mini",
3473+
"cost_per_1m_in": 0.15,
3474+
"cost_per_1m_out": 0.6,
3475+
"context_window": 128000,
3476+
"default_max_tokens": 4096,
3477+
"can_reason": false,
3478+
"supports_attachments": true
3479+
},
3480+
{
3481+
"id": "openai/gpt-4o",
3482+
"name": "OpenAI: GPT-4o",
3483+
"cost_per_1m_in": 2.5,
3484+
"cost_per_1m_out": 10,
3485+
"context_window": 128000,
3486+
"default_max_tokens": 4096,
3487+
"can_reason": false,
3488+
"supports_attachments": true
3489+
},
3490+
{
3491+
"id": "anthropic/claude-sonnet-4-5",
3492+
"name": "Anthropic: Claude Sonnet 4.5",
3493+
"cost_per_1m_in": 3,
3494+
"cost_per_1m_out": 15,
3495+
"context_window": 200000,
3496+
"default_max_tokens": 8192,
3497+
"can_reason": true,
3498+
"supports_attachments": true
3499+
},
3500+
{
3501+
"id": "google/gemini-2.5-flash",
3502+
"name": "Google: Gemini 2.5 Flash",
3503+
"cost_per_1m_in": 0.3,
3504+
"cost_per_1m_out": 2.5,
3505+
"context_window": 1048576,
3506+
"default_max_tokens": 8192,
3507+
"can_reason": true,
3508+
"supports_attachments": true
3509+
}
3510+
]
3511+
},
34613512
{
34623513
"name": "Venice AI",
34633514
"id": "venice",
@@ -3663,4 +3714,4 @@
36633714
]
36643715
}
36653716
]
3666-
}
3717+
}

0 commit comments

Comments
 (0)