feat: use Google Gemini as default vision backend, make provider configurable

- Plugin options: baseURL, apiKey, model, providerID, visionModels
- Default: Google Gemini OpenAI-compatible endpoint, gemini-2.5-flash
- Support {env:VAR} templates and GEMINI_API_KEY fallback
- Legacy fallback to ludmila-ai provider block for existing setups
- vision.md subagent now uses google/gemini-2.5-flash
This commit is contained in:
Maksim Totmin
2026-08-04 20:37:40 +07:00
parent 5e24763323
commit 04e3eb8dda
5 changed files with 151 additions and 73 deletions
+14 -14
View File
@@ -2,31 +2,31 @@
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-browser",
"git+https://git.totmin.ru/en2zmax/vision-bridge.git"
[
"git+https://git.totmin.ru/en2zmax/vision-bridge.git",
{
"baseURL": "https://generativelanguage.googleapis.com/v1beta/openai",
"apiKey": "{env:GEMINI_API_KEY}",
"model": "gemini-2.5-flash"
}
]
],
"provider": {
"ludmila-ai": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ludmila AI",
"google": {
"npm": "@ai-sdk/google",
"name": "Google",
"options": {
"baseURL": "https://ai.totmin.ru/v1",
"apiKey": "<ЗАМЕНИТЕ_НА_ВАШ_API_КЛЮЧ>"
"apiKey": "{env:GEMINI_API_KEY}"
},
"models": {
"gemini/gemini-2.5-flash": {
"attachment": true,
"limit": {
"context": 1048576,
"output": 65536
}
}
"gemini-2.5-flash": {}
}
}
},
"agent": {
"vision": {
"mode": "subagent",
"model": "ludmila-ai/gemini/gemini-2.5-flash",
"model": "google/gemini-2.5-flash",
"description": "Анализ изображений и скриншотов (OCR текста или разбор UI)",
"permission": {
"read": "allow",