Add AI provider integration guide and new providers support#2900
Merged
Conversation
…ction Add a step-by-step guide for AI infrastructure companies to implement ai.Model and contribute a provider to go-micro. Covers the full lifecycle: skeleton, tool call handling, tests, registration, and PR checklist. Add a "Supported AI Providers" section to the project README that lists current providers (Anthropic, OpenAI) in a table and links to the integration guide with a call-to-action for new providers and sponsors. Streamline the "Adding a New Provider" section in ai/README.md to point to the new guide instead of duplicating a full code listing.
Move the 800px max-width from .markdown-body up to .content so the entire content pane (not just the inner body) is sized correctly. The container now fills up to 800px beside the sidebar.
Import atlascloud provider in the micro server so it is available when running micro run / micro server. Add atlascloud to AutoDetectProvider so --ai_base_url with an atlascloud domain selects the right provider automatically.
Add ai/gemini implementing ai.Model for Google's Gemini API. Uses the native generateContent endpoint with system_instruction, contents/parts, and functionDeclarations — not an OpenAI shim. Default model gemini-2.5-flash, auth via x-goog-api-key header. Wire into micro server imports and AutoDetectProvider (matches googleapis.com and google in base URL). Update README.md and ai/README.md with provider listing.
Add three new OpenAI-compatible providers: - ai/groq: ultra-fast inference, default model llama-3.3-70b-versatile - ai/mistral: Mistral AI, default model mistral-large-latest - ai/together: Together AI, default model Llama-3.3-70B-Instruct-Turbo All three are wired into the micro server imports and AutoDetectProvider. README and ai/README updated with the full provider table.
Extract the registry-discovery + RPC-execution loop from the web agent playground into a reusable ai/tools package: - tools.New(reg) creates a Set bound to a registry - Set.Discover() walks the registry and returns []ai.Tool with LLM-safe (underscored) names, remembering the mapping back to the original dotted form - Set.Handler(client) returns an ai.ToolHandler that resolves the safe name and issues the RPC Add cmd/micro/chat — an interactive 'micro chat' REPL that uses ai/tools to let users talk to their services through any registered AI provider. Supports --prompt for single-shot use, auto-detects the provider from --base_url, and falls back to the provider's conventional env var (ANTHROPIC_API_KEY, etc). Update README with the new command and the programmatic example.
Add examples/grpc-interop showing that any standard gRPC client can call a go-micro service — no go-micro SDK required on the client side. Includes: - proto/greeter.proto with generated Go, gRPC, and micro stubs - server/ using go-micro gRPC transport - client/ using stock google.golang.org/grpc (no go-micro imports) - README with Python example and explanation of how routing works Addresses the confusion from issue #2818 where users didn't know that go-micro gRPC services are callable by any gRPC client.
d83e242 to
5d37a7e
Compare
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.
No description provided.