mirror of
https://github.com/lukaszraczylo/mcp-captcharesolver.git
synced 2026-10-18 01:17:53 +00:00
feat(llm): implement native gemini generateContent provider (vision + audio)
- Replace stub Vision/Transcribe with real REST implementation
- Endpoint: POST {base}/v1beta/models/{model}:generateContent
- Auth via x-goog-api-key header
- Vision: text part + inline_data per image (mime_type from Image.MediaType)
- Transcribe: transcription prompt + inline_data audio (default audio/wav)
- Model selection: opts.Model > audioModel (transcribe) > c.model
- maxTokens mapped to generationConfig.maxOutputTokens when non-zero
- Add httptest coverage: TestGeminiVision, TestGeminiTranscribe
- Re-enable gemini in tools.go audio capability check
This commit is contained in:
@@ -174,8 +174,7 @@ type SolverInfoOut struct {
|
||||
}
|
||||
|
||||
func (h *Handlers) solverInfo(_ context.Context, _ *mcp.CallToolRequest, _ struct{}) (*mcp.CallToolResult, SolverInfoOut, error) {
|
||||
// gemini is a stub; re-add when implemented
|
||||
audio := h.provider == "openai" || h.provider == "openai-compatible"
|
||||
audio := h.provider == "openai" || h.provider == "openai-compatible" || h.provider == "gemini"
|
||||
return nil, SolverInfoOut{
|
||||
Provider: h.provider, Model: h.model,
|
||||
Capabilities: map[string]bool{
|
||||
|
||||
Reference in New Issue
Block a user