cloudflare / cloudflare/agents-starter

Feature request: model switcher

Open
#16 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
283
PR merge metrics
No merged PRs in 30d

Description

When building with the Agents SDK, developers must hardcode model selection in their Agent implementation (e.g., model: openai("gpt-4o-2024-11-20")). There's currently no straightforward way for users to select different models through the frontend UI and have that selection automatically synchronized with the backend.
Would it be possible to update the agents starter template to include a working model switcher component in the frontend? This would ideally demonstrate:

1. A simple UI dropdown/selector for models
2. A mechanism for communicating the selected model to the backend in real-time
3. Backend code that respects and uses the frontend's model selection without requiring restart
4. Elegantly handle cases for models without tool support

Such an example would significantly improve developer experience of this starter by showing how to implement this common feature without complex custom code to manage the frontend-backend synchronization.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the agents starter template's frontend UI and backend Agent implementation, since the issue provides no file paths or tests. Trace how the selected model could reach the backend and how model capabilities affect tools; done means a working selector, live synchronization without restart, backend use of the selection, and graceful handling of models without tool support.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.