Add Anthropic model support to the agent#2855
Merged
Conversation
- Add playground.html template with chat-style agent prompt interface - Add /playground route handler in server - Add /api/mcp/tools endpoint to list available MCP tools - Add /api/mcp/call endpoint to invoke MCP tools via RPC - Add Playground link to sidebar navigation - Playground auto-discovers services from registry and renders them as callable tools with input forms and activity logging Co-authored-by: asim <17530+asim@users.noreply.github.com>
Fix .gitignore pattern 'micro' -> '/micro' to only ignore root-level binary, not paths containing 'micro' as a component. Co-authored-by: asim <17530+asim@users.noreply.github.com>
…emove dup comment Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Continue work on micro mcp and playground integration
Add MCP Playground to server web UI
Feb 12, 2026
- Rename /playground to /agent, move Agent link to top of sidebar menu - Fix template styling: use existing form/input/button CSS from styles.css instead of inline styles and form-plain class - Add /api/agent/settings GET/POST endpoints for model API key, model name, and base URL configuration (stored in server store) - Add /api/agent/prompt POST endpoint that sends user prompt to OpenAI-compatible LLM API with tool definitions from registry, executes any tool calls via RPC, and returns results with a follow-up LLM summary - Show available tools in a table using existing table styles - Prompt section is placed above settings for primary workflow Co-authored-by: asim <17530+asim@users.noreply.github.com>
…improve param descriptions Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot
AI
changed the title
Add MCP Playground to server web UI
Rename Playground to Agent, fix styling, add LLM-powered tool calling
Feb 12, 2026
Support both OpenAI and Anthropic APIs in the agent prompt handler: - Add provider selector (OpenAI/Anthropic) to settings UI and backend - Auto-detect provider from base URL when not explicitly set - Anthropic: use /v1/messages endpoint, x-api-key header, input_schema format for tools, content blocks for responses, tool_use/tool_result message format for follow-ups - OpenAI: unchanged /v1/chat/completions with Bearer auth - Default models: gpt-4o (OpenAI), claude-sonnet-4-20250514 (Anthropic) - Provider-specific defaults for base URLs Co-authored-by: asim <17530+asim@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot
AI
changed the title
Rename Playground to Agent, fix styling, add LLM-powered tool calling
Add Anthropic model support to the agent
Feb 12, 2026
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.
The agent prompt handler only supported OpenAI's API format. Anthropic uses a fundamentally different API: different endpoint (
/v1/messages), auth header (x-api-key), tool schema (input_schema), and response format (content blocks withtool_usetype).Changes
providersetting (openai|anthropic, auto-detected from base URL if unset) to build provider-specific requests, headers, and response parsing/v1/messagesendpoint,x-api-key+anthropic-versionheaders,input_schematool format,systemas top-level field,max_tokens(required),tool_use/tool_resultcontent blocks for tool call round-tripstoolInfostruct,executeToolCallandcallLLMAPIclosures to avoid duplicating registry scanning and RPC execution across providersgpt-4o/api.openai.comfor OpenAI,claude-sonnet-4-20250514/api.anthropic.comfor AnthropicExample: Anthropic tool call flow
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
224.0.0.251REDACTED, pid is -1(packet block)api.anthropic.com/tmp/micro-test /tmp/micro-test server --address :9090 /tmp/go-build3779211617/b458/vet.cfg .a /libexec/gcc/x86_64-linux-gnu/13/lto-wrapper ux_amd64/vet s-through=-lgcc s-through=-lgcc_-atomic s-through=-lpthr-bool ux_amd64/vet s-th�� O9bb1czWs -I ux_amd64/compile-nilfunc -I util/backoff(dns block)api.openai.com/tmp/micro-test /tmp/micro-test server --address :9090 /tmp/go-build3779211617/b458/vet.cfg .a /libexec/gcc/x86_64-linux-gnu/13/lto-wrapper ux_amd64/vet s-through=-lgcc s-through=-lgcc_-atomic s-through=-lpthr-bool ux_amd64/vet s-th�� O9bb1czWs -I ux_amd64/compile-nilfunc -I util/backoff(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.