Skip to content

Commit 3fa09ed

Browse files
committed
refactor: simplify available models and remove unused MCP servers
1 parent 6dd7f7c commit 3fa09ed

File tree

4 files changed

+6
-46
lines changed

4 files changed

+6
-46
lines changed

definitions/vite-cfagents-runner/prompts/usage.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ There are already several models presupplied with the template along with proper
2525
* **Real MCP Integration**: Connects to actual MCP servers, not simulated implementations
2626
* **Cloudflare MCP Servers**: Direct integration with Cloudflare Bindings and Observability servers
2727
* **Intelligent Tool Usage**: AI automatically detects when to use tools (D1, R2, Workers, Web browsing)
28-
* **Multi-Model Support**: Switch between GPT-4o, Gemini 2.0/2.5 Flash/Pro, Claude Opus 4
28+
* **Multi-Model Support**: Switch between various models
2929
* **Production Tools**: Query D1 databases, manage R2 buckets, get Worker analytics
3030
* **Web Browsing**: Browse and extract content from web pages through MCP server
3131
* **Persistent Conversations**: Maintains chat history using Durable Objects state in Cloudflare Agents.
@@ -78,35 +78,6 @@ There are already several models presupplied with the template along with proper
7878

7979
---
8080

81-
## Available MCP Servers and Tools
82-
83-
The template uses the official MCP SDK with Cloudflare's production servers:
84-
85-
### Cloudflare Documentation MCP Server:
86-
- Access to Cloudflare documentation and resources
87-
- Connected via `https://docs.mcp.cloudflare.com/sse`
88-
89-
### Cloudflare Browser MCP Server:
90-
- Web browsing capabilities through Cloudflare
91-
- Connected via `https://browser.mcp.cloudflare.com/sse`
92-
93-
### Custom Tools:
94-
- **`get_weather`** - Weather information (example custom tool)
95-
96-
### MCP Server Integration Example
97-
98-
Adding a new MCP server (in `worker/mcp-client.ts`):
99-
100-
```typescript
101-
const MCP_SERVERS: MCPServerConfig[] = [
102-
{
103-
name: 'cloudflare-docs',
104-
command: 'npx',
105-
args: ['mcp-remote', 'https://docs.mcp.cloudflare.com/sse']
106-
},
107-
];
108-
```
109-
11081
The system automatically:
11182
- Connects to MCP servers using proper transport
11283
- Uses official MCP SDK schemas for validation
@@ -168,12 +139,13 @@ tooltip.tsx
168139

169140
# Important Notes
170141
- Conversations and persistence are already handled by the template. Utilize existing utilities and apis to build something greater.
142+
- For example, to build a chatgpt clone - You just need to build the frontend and use existing APIs without modifying them.
171143

172144
# Available bindings:
173145
**Only The following bindings are to be used in the project! Do not use any other bindings or remove/replace any of the bindings**
174146
- `CHAT_AGENT`: A durable object binding for the chat agent, but can be extended and used for other agentic purposes
175147
- `APP_CONTROLLER`: A durable object binding for the app controller, but can be extended and used for other agentic purposes
176148
**IMPORTANT: You are NOT ALLOWED to edit/add/remove ANY worker bindings OR touch wrangler.jsonc/wrangler.toml. Build your application around what is already provided.**
177149

178-
# IMPORTANT NOTE: If AI capabilities are required, you must inform the user that although this project has AI capaibilities, there is no way to pass API keys and thus AI inferencing won't work. Users must export the app to their github, then make necessary changes and deploy it themselves to have it work. This is due to security reasons but we are implementing it in a secure way, and this would be available soon.
150+
# IMPORTANT NOTE: You must inform the user that although this project has AI capaibilities, There is a limit on the number of requests that can be made to the AI servers across all user apps in a given time period.
179151
Add the above note in an appropriate and visible location in the app - like in the footer or in the chat interface or as a modal

definitions/vite-cfagents-runner/src/lib/chat.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,8 @@ export interface ChatResponse {
88

99
export const MODELS = [
1010
{ id: 'google-ai-studio/gemini-2.5-flash', name: 'Gemini 2.5 Flash' },
11-
{ id: 'openai/gpt-4o', name: 'ChatGPT 4o' },
12-
{ id: 'google-ai-studio/gemini-2.0-flash', name: 'Gemini 2.0 Flash' },
1311
{ id: 'google-ai-studio/gemini-2.5-pro', name: 'Gemini 2.5 Pro' },
14-
{ id: 'grok/grok-4-latest', name: 'Grok 4 Latest' },
15-
{ id: 'workers-ai/@cf/moonshotai/kimi-k2-instruct', name: 'Kimi K2 Instruct' },
16-
{ id: 'openai/gpt-5', name: 'ChatGPT 5' },
17-
{ id: 'openai/gpt-5-mini', name: 'ChatGPT 5 Mini' },
18-
{ id: 'openai/gpt-oss-120b', name: 'ChatGPT OSS 120B' },
19-
{ id: 'cerebras/gpt-oss-120b', name: 'Cerebras ChatGPT OSS 120B' },
20-
{ id: 'cerebras/qwen-3-coder-480b', name: 'Cerebras Qwen 3 Coder 480B' },
12+
{ id: 'google-ai-studio/gemini-2.0-flash', name: 'Gemini 2.0 Flash' },
2113
];
2214

2315
class ChatService {

definitions/vite-cfagents-runner/worker/mcp-client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ interface MCPServerConfig {
77
}
88

99
const MCP_SERVERS: MCPServerConfig[] = [
10-
{
11-
name: 'cloudflare-docs',
12-
sseUrl: 'https://docs.mcp.cloudflare.com/sse'
13-
},
1410
];
1511

1612
export class MCPManager {

0 commit comments

Comments
 (0)