add opus and remove some models and gradio 6 update
Browse filesFiles changed (5)
97 unmodified lines989910010110210310410510610710810911011111211380 unmodified lines1941951961971981992001084 unmodified lines128512861287128812891290129197 unmodified lines{"name": "MiniMax M2", "id": "MiniMaxAI/MiniMax-M2", "description": "MiniMax M2 model via HuggingFace InferenceClient with Novita provider"},{"name": "DeepSeek V3.2-Exp", "id": "deepseek-ai/DeepSeek-V3.2-Exp", "description": "DeepSeek V3.2 Experimental via HuggingFace"},{"name": "DeepSeek R1", "id": "deepseek-ai/DeepSeek-R1-0528", "description": "DeepSeek R1 model for code generation"},{"name": "GPT-5", "id": "gpt-5", "description": "OpenAI GPT-5 via OpenRouter"},{"name": "GPT-5.1", "id": "gpt-5.1", "description": "OpenAI GPT-5.1 model via Poe for advanced code generation and general tasks"},{"name": "GPT-5.1 Instant", "id": "gpt-5.1-instant", "description": "OpenAI GPT-5.1 Instant model via Poe for fast responses"},{"name": "GPT-5.1 Codex", "id": "gpt-5.1-codex", "description": "OpenAI GPT-5.1 Codex model via Poe optimized for code generation"},{"name": "Claude-Sonnet-4.5", "id": "claude-sonnet-4.5", "description": "Anthropic Claude Sonnet 4.5 via Poe (OpenAI-compatible)"},{"name": "Claude-Haiku-4.5", "id": "claude-haiku-4.5", "description": "Anthropic Claude Haiku 4.5 via Poe (OpenAI-compatible)"},{"name": "Kimi K2 Thinking", "id": "moonshotai/Kimi-K2-Thinking", "description": "Moonshot Kimi K2 Thinking model via HuggingFace with Together AI provider"},{"name": "GLM-4.6", "id": "zai-org/GLM-4.6", "description": "GLM-4.6 model via HuggingFace with Cerebras provider"},{"name": "Gemini Flash Latest", "id": "gemini-flash-latest", "description": "Google Gemini Flash via OpenRouter"},{"name": "Qwen3 Max Preview", "id": "qwen3-max-preview", "description": "Qwen3 Max Preview via DashScope API"},]# Cache model lookup for faster access (built after AVAILABLE_MODELS is defined)80 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "MiniMaxAI/MiniMax-M2"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False1084 unmodified linesquery = data.get("query")language = data.get("language", "html")model_id = data.get("model_id", "MiniMaxAI/MiniMax-M2")# Send acknowledgmentawait websocket.send_json({97 unmodified lines989910010110210310410510610710810911011180 unmodified lines1921931941951961971981084 unmodified lines128312841285128612871288128997 unmodified lines{"name": "MiniMax M2", "id": "MiniMaxAI/MiniMax-M2", "description": "MiniMax M2 model via HuggingFace InferenceClient with Novita provider"},{"name": "DeepSeek V3.2-Exp", "id": "deepseek-ai/DeepSeek-V3.2-Exp", "description": "DeepSeek V3.2 Experimental via HuggingFace"},{"name": "DeepSeek R1", "id": "deepseek-ai/DeepSeek-R1-0528", "description": "DeepSeek R1 model for code generation"},{"name": "GPT-5.1", "id": "gpt-5.1", "description": "OpenAI GPT-5.1 model via Poe for advanced code generation and general tasks"},{"name": "GPT-5.1 Instant", "id": "gpt-5.1-instant", "description": "OpenAI GPT-5.1 Instant model via Poe for fast responses"},{"name": "GPT-5.1 Codex", "id": "gpt-5.1-codex", "description": "OpenAI GPT-5.1 Codex model via Poe optimized for code generation"},{"name": "Claude-Opus-4.5", "id": "claude-opus-4.5", "description": "Anthropic Claude Opus 4.5 via Poe (OpenAI-compatible)"},{"name": "Claude-Sonnet-4.5", "id": "claude-sonnet-4.5", "description": "Anthropic Claude Sonnet 4.5 via Poe (OpenAI-compatible)"},{"name": "Claude-Haiku-4.5", "id": "claude-haiku-4.5", "description": "Anthropic Claude Haiku 4.5 via Poe (OpenAI-compatible)"},{"name": "Kimi K2 Thinking", "id": "moonshotai/Kimi-K2-Thinking", "description": "Moonshot Kimi K2 Thinking model via HuggingFace with Together AI provider"},{"name": "GLM-4.6", "id": "zai-org/GLM-4.6", "description": "GLM-4.6 model via HuggingFace with Cerebras provider"},]# Cache model lookup for faster access (built after AVAILABLE_MODELS is defined)80 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "claude-opus-4.5"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False1084 unmodified linesquery = data.get("query")language = data.get("language", "html")model_id = data.get("model_id", "claude-opus-4.5")# Send acknowledgmentawait websocket.send_json({
248 unmodified lines24925025125225325425548 unmodified lines304305306307308309310311312313314315316248 unmodified linesdocs_content = get_gradio_docs_content()# Base system prompt with anycoder-specific instructionsbase_prompt = """You are an expert Gradio developer. Create a complete, working Gradio application based on the user's request. Generate all necessary code to make the application functional and runnable.## Multi-File Application Structure48 unmodified lines---## Final Instructions- Always use the exact function signatures and patterns from the Gradio 6 documentation above- Follow Gradio 6 migration guidelines if you're familiar with older versions- Use modern Gradio 6 API patterns (e.g., footer_links instead of show_api, api_visibility instead of show_api in events)- Generate production-ready code that follows all best practices- Always include the "Built with anycoder" attribution in the header"""248 unmodified lines24925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329448 unmodified lines343344345346347348349350351352353354355356357358359360361362363248 unmodified linesdocs_content = get_gradio_docs_content()# Base system prompt with anycoder-specific instructionsbase_prompt = """🚨 CRITICAL: You are an expert Gradio 6 developer. You MUST use Gradio 6 syntax and API.## Key Gradio 6 Changes (MUST FOLLOW):- Use `footer_links` parameter instead of removed `show_api` in gr.Blocks()- Use `api_visibility` instead of `api_name` in event listeners- Use modern Gradio 6 component syntax (check documentation below)- Gradio 6 has updated component APIs - always refer to the documentation below- DO NOT use deprecated Gradio 5 or older syntaxCreate a complete, working Gradio 6 application based on the user's request. Generate all necessary code to make the application functional and runnable.## Gradio 6 Example (Your Code Should Follow This Pattern):```pythonimport gradio as grdef process(text):return f"Processed: {text}"# Gradio 6 Blocks with footer_links (NOT show_api)with gr.Blocks(title="My App",footer_links=[{"label": "Built with anycoder", "url": "https://huggingface.co/spaces/akhaliq/anycoder"}]) as demo:with gr.Row():input_text = gr.Textbox(label="Input")output_text = gr.Textbox(label="Output")btn = gr.Button("Process")# Gradio 6 events use api_visibility (NOT just api_name)btn.click(fn=process,inputs=[input_text],outputs=[output_text],api_visibility="public" # Gradio 6 syntax)demo.launch()```## Multi-File Application Structure48 unmodified lines---## 🚨 CRITICAL FINAL INSTRUCTIONS - GRADIO 6 ONLYYOU MUST USE GRADIO 6 SYNTAX. This is MANDATORY:1. **ONLY use Gradio 6 API** - Do NOT use Gradio 5 or older syntax2. **Reference the documentation above** - All function signatures and patterns are from Gradio 63. **Use modern Gradio 6 patterns:**- Use `footer_links` parameter in gr.Blocks() (NOT show_api)- Use `api_visibility` in event listeners (NOT api_name alone)- Use updated component syntax from Gradio 6 documentation4. **Follow Gradio 6 migration guide** if you see any deprecated patterns5. **Generate production-ready Gradio 6 code** that follows all best practices6. **Always include "Built with anycoder"** as clickable text in the header linking to https://huggingface.co/spaces/akhaliq/anycoderREMINDER: You are writing Gradio 6 code. Double-check all syntax against the Gradio 6 documentation provided above."""
49 unmodified lines5051525354555657585960616243 unmodified lines1061071081091101118 unmodified lines12012112212312412512612712812913013113241 unmodified lines17417517617717817918018118218318418518649 unmodified linesbase_url="https://dashscope.aliyuncs.com/compatible-mode/v1",)elif model_id == "gpt-5":# Use Poe (OpenAI-compatible) client for GPT-5 modelreturn OpenAI(api_key=os.getenv("POE_API_KEY"),base_url="https://api.poe.com/v1")elif model_id == "gpt-5.1":# Use Poe (OpenAI-compatible) client for GPT-5.1 modelreturn OpenAI(43 unmodified linesbase_url="https://api.poe.com/v1")elif model_id == "claude-sonnet-4.5":# Use Poe (OpenAI-compatible) client for Claude-Sonnet-4.5return OpenAI(8 unmodified linesbase_url="https://api.poe.com/v1")elif model_id == "qwen3-max-preview":# Use DashScope International OpenAI client for Qwen3 Max Previewreturn OpenAI(api_key=os.getenv("DASHSCOPE_API_KEY"),base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",)elif model_id == "x-ai/grok-4.1-fast":# Use OpenRouter client for Grok 4.1 Fast modelreturn OpenAI(41 unmodified linesbase_url="https://generativelanguage.googleapis.com/v1beta/openai/",)elif model_id == "gemini-flash-latest":# Use Google Gemini Flash Latest (OpenAI-compatible) clientreturn OpenAI(api_key=os.getenv("GEMINI_API_KEY"),base_url="https://generativelanguage.googleapis.com/v1beta/openai/",)elif model_id == "gemini-flash-lite-latest":# Use Google Gemini Flash Lite Latest (OpenAI-compatible) clientreturn OpenAI(49 unmodified lines50515253545543 unmodified lines991001011021031041051061071081091101118 unmodified lines12012112212312412541 unmodified lines16716816917017117249 unmodified linesbase_url="https://dashscope.aliyuncs.com/compatible-mode/v1",)elif model_id == "gpt-5.1":# Use Poe (OpenAI-compatible) client for GPT-5.1 modelreturn OpenAI(43 unmodified linesbase_url="https://api.poe.com/v1")elif model_id == "claude-opus-4.5":# Use Poe (OpenAI-compatible) client for Claude-Opus-4.5return OpenAI(api_key=os.getenv("POE_API_KEY"),base_url="https://api.poe.com/v1")elif model_id == "claude-sonnet-4.5":# Use Poe (OpenAI-compatible) client for Claude-Sonnet-4.5return OpenAI(8 unmodified linesbase_url="https://api.poe.com/v1")elif model_id == "x-ai/grok-4.1-fast":# Use OpenRouter client for Grok 4.1 Fast modelreturn OpenAI(41 unmodified linesbase_url="https://generativelanguage.googleapis.com/v1beta/openai/",)elif model_id == "gemini-flash-lite-latest":# Use Google Gemini Flash Lite Latest (OpenAI-compatible) clientreturn OpenAI(
16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('zai-org/GLM-4.6');const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);const [currentRepoId, setCurrentRepoId] = useState<string | null>(null); // Track imported/deployed space16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('claude-opus-4.5');const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);const [currentRepoId, setCurrentRepoId] = useState<string | null>(null); // Track imported/deployed space
27 unmodified lines2829303132333427 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'zai-org/GLM-4.6',onAuthChange}: LandingPageProps) {const [prompt, setPrompt] = useState('');27 unmodified lines2829303132333427 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'claude-opus-4.5',onAuthChange}: LandingPageProps) {const [prompt, setPrompt] = useState('');
backend_api.py+3-5
backend_docs_manager.py+54-7
backend_models.py+7-21
frontend/src/app/page.tsx+1-1
frontend/src/components/LandingPage.tsx+1-1