feat: Add comprehensive Playground UI for model testing#259
Open
fdkgenie wants to merge 18 commits intodecolua:masterfrom
Open
feat: Add comprehensive Playground UI for model testing#259fdkgenie wants to merge 18 commits intodecolua:masterfrom
fdkgenie wants to merge 18 commits intodecolua:masterfrom
Conversation
Co-authored-by: fdkgenie <75261157+fdkgenie@users.noreply.github.com>
Add Ramclouds API provider
- Fixed syntax errors in autoFetchModels.js (removed duplicate lines) - Added Ramclouds to validation endpoint - Added automatic model fetching when creating provider connections - Updated /v1/models API to prioritize dynamically fetched models over static ones - Updated test-models endpoint to use fetched models from connection data - Updated provider detail page to reactively compute models using useMemo This ensures that when adding Ramclouds with a valid API key, the system automatically fetches and displays all 12 available models instead of falling back to the static "auto" model. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added Amp CLI configuration to cliTools.js with settings and secrets file paths - Created API endpoint /api/cli-tools/amp-settings for managing Amp configuration - Created AmpToolCard component for Amp CLI configuration UI - Integrated Amp CLI into CLI Tools page with status checking and auto-apply - Added Amp logo (amp.svg) to public/providers Configuration supports: - Base URL configuration (~/.config/amp/settings.json) - API key management (~/.local/share/amp/secrets.json) - Environment variable alternatives (AMP_URL, AMP_API_KEY) - Manual configuration export for copy-paste setup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added comprehensive Amp CLI integration with: **Settings & Configuration:** - Added ampUpstreamUrl, ampUpstreamApiKey, ampRestrictManagementToLocalhost to settings - Added 6 default Amp modes with model mappings (Smart, Rush, Oracle, Librarian, Search, Review) - Created settings UI in profile page for Amp upstream configuration **Server-Side Proxy Endpoints:** - /api/provider/[provider]/[...path] - Routes provider API requests - Checks if model is mapped locally → uses local 9router providers - If not mapped → forwards to ampcode.com as reverse proxy - /api/auth/[...path] - Proxies management API auth requests - /api/threads/[...path] - Proxies threads management API - /api/user/[...path] - Proxies user management API - All management APIs authenticate with 9router API keys and forward to upstream **Client-Side UI:** - Updated AmpToolCard with model mapping UI for 6 Amp modes - Added model selector for each Amp mode - Integrated with CLIToolsPageClient for model mappings state - Updated amp-settings API to save model mappings **Features:** - Auto-decompression of gzipped responses from upstream - Localhost restriction option for management APIs - Model mapping storage in 9router settings - Seamless routing between local and upstream models Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This aligns internal, user, auth, threads, and provider endpoint behavior with Amp expectations so login, startup checks, and execute flows work reliably with local 9router routing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implement /api/providers/[id]/models endpoint to fetch models from provider APIs - Update ModelSelectModal to use dynamic models from providerSpecificData - Update CLI Tools and MITM pages to prioritize dynamic models over static config - Add Ramclouds provider logo - Fallback to static models when dynamic fetch is unavailable
Resolves issue where proxy returned malformed payloads mixing JSON and SSE terminators (e.g., JSON body followed by `data: [DONE]`), causing SDK/client parsers to fail. Changes: - Correct stream intent: require explicit `stream: true` instead of defaulting to streaming when omitted - Add upstream content-type validation: route non-SSE responses to JSON handler even when streaming is requested - Gate [DONE] sentinel: only append SSE terminator when valid SSE data events were observed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes issue where gemini-web-to-api returns non-streaming JSON but Claude Code CLI expects SSE format, causing "request ended without sending any chunks" error. Changes: - Add jsonToSseHandler to convert JSON responses to SSE streams - Update chatCore to route JSON responses through converter when client requests streaming - Preserve SSE headers in Amp CLI proxy route handler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019cc6d1-0898-724e-8742-95f443b728ff Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019cc6d1-0898-724e-8742-95f443b728ff Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019cc6d1-0898-724e-8742-95f443b728ff Co-authored-by: Amp <amp@ampcode.com>
…d snippets Amp-Thread-ID: https://ampcode.com/threads/T-019cc6d1-0898-724e-8742-95f443b728ff Co-authored-by: Amp <amp@ampcode.com>
Implemented medium-priority features: - Multi-turn chat session with context preservation - Parameter controls (temperature, top_p, max_tokens) - System prompt support - Persist default model and preferences to localStorage - Enhanced streaming with character count display This builds on the high-priority features already committed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n, and batch eval Implemented step 3 advanced features: - Debug panel showing request/response headers and details - Cost estimation with pricing data integration - Batch evaluation mode to run multiple prompts sequentially - Toggle between single and batch mode - Summary statistics for batch runs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changed from single column to 2-column layout for better balance: - Left column: Input controls (model, prompts, parameters, batch mode) - Right column: Output and results (output, chat session, debug panel, history) - Responsive: stacks to 1 column on smaller screens (xl breakpoint) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add a full-featured Playground UI to test models, debug requests, and evaluate performance directly from the dashboard.
Key Features
🎯 Core Testing
🔧 Advanced Controls
📊 Batch Evaluation
💾 Developer Tools
🎨 UI/UX
Technical Details
/dashboard/playgroundsrc/app/(dashboard)/dashboard/playground/page.js(776 lines)/api/v1/chat/completionsendpointTesting
Screenshots
The playground provides a clean, intuitive interface similar to OpenAI Playground and Anthropic Console, with all controls on the left and results on the right.
Migration Notes
No breaking changes. This is a pure addition with no impact on existing functionality.