Commit Graph
8 Commits
Author SHA1 Message Date
lukaszraczylo c8edd4aa06 feat(llm): fake supports per-call response sequences
Add VisionResponses to Fake. Vision returns the element matching the
call index (clamped to last beyond length), falling back to VisionResp
when empty. Enables self-consistency voting tests.
2026-06-07 17:37:10 +01:00
lukaszraczylo 5476aefb11 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
2026-06-07 14:24:16 +01:00
lukaszraczylo 8bfd64f7ed fix: address code review (v3/v2 detect, gemini caps, fetch timeout, audio mime, json extract, dead temp config)
- detect: recaptcha_v3 now suppresses recaptcha_v2 (hidden g-recaptcha div on v3 pages no longer mis-detected as LLM-solvable); funcaptcha drops over-broad bare "arkose" substring
- llm/gemini: stub methods return ErrUnsupported{Provider:"gemini"} so audio handler errors.As guard catches it; drop unused fmt import
- mcp/tools: remove gemini from audio capability (stub); pick audio filename (.wav/.mp3) from sniffed media type; schema notes for browser/actions no longer advertise unimplemented options
- imageutil: fetchURL uses a package client with 30s Timeout instead of http.DefaultClient
- captcha/json: extractJSON brace-counts to return the first balanced object (handles prose, markdown fences, example-before-real)
- config: remove dead CAPTCHA_LLM_TEMPERATURE / Config.Temperature; solving is fixed at temperature 0
- stealth: Action.Type doc comment drops nonexistent scroll case
2026-06-07 14:15:43 +01:00
lukaszraczylo d96b7134f1 fix(llm): retry openai chat with max_completion_tokens when max_tokens is rejected 2026-06-07 13:38:55 +01:00
lukaszraczylo d008ba1424 feat(llm): provider factory with per-provider default base URLs 2026-06-07 13:08:27 +01:00
lukaszraczylo f6def2f71d feat(llm): anthropic vision provider (audio unsupported) 2026-06-07 13:07:57 +01:00
lukaszraczylo 967b28769f feat(llm): openai-compatible vision and transcription provider 2026-06-07 13:07:25 +01:00
lukaszraczylo 43aa78abc5 feat(llm): client interface and fake test double 2026-06-07 13:05:59 +01:00