Wagos AI Core
Shared LLM gateway, provider keys and access groups for the Wagos AI modules
Version: 19.0.3.3.0
Technical
Wagos AI Core
Your AI keys, your provider account, no IAP credits
The shared foundation every Wagos AI module builds on. It stores the Google Gemini and OpenAI API keys for the database and exposes a single request gateway that handles authentication, document upload, structured JSON output, timeouts and provider error reporting. Requests are billed straight to your own provider account.
What It Provides
- Provider keys for Google Gemini and OpenAI, restricted to the Settings administrator.
- Editable model names — providers retire models regularly, so you change a setting rather than wait for a module update.
- Document input — PDFs and images are sent inline to both providers.
- Structured output — answers are constrained by JSON Schema on the provider side.
- Image generation stored as real attachments, never expiring provider links.
- Test Connection button to validate a key before anyone relies on it.
- Wagos AI User / Manager access groups, shared across the AI modules.
- Request log — every provider call recorded with its token counts, duration and result, including the ones that failed.
- Cost tracking — price your models per million tokens and see the spend by feature, document, user or month.
- Automatic retries on rate limits and transient provider errors.
Community Compatible
No Odoo Enterprise subscription and no PostgreSQL pgvector extension required. The only dependency is base_setup.
Setup: Google Gemini
1. Get a Gemini API key
- Sign in to Google AI Studio with the Google account that will pay for the usage.
- Click Get API key → Create API key and choose (or create) a Google Cloud project.
- Turn on billing for that project. Free-tier keys hit
429quota errors quickly, and free-tier traffic may be used by Google for training. A paid key is not. - Copy the key (it starts with
AIza). - Recommended: in the Google Cloud console, restrict the key to the Generative Language API and add a monthly budget alert. A budget only warns; it never stops spending.
- For a hard spending ceiling, go to APIs & Services → Generative Language API → Quotas and lower the daily request cap (Requests Per Day). Once it is reached, Google refuses further calls until the quota resets.
2. Configure Odoo
- Install Wagos AI Core and the AI-OCR modules you need from Apps.
- Go to Settings → Wagos AI → AI Providers: set Default Provider to Google Gemini, paste the API Key, keep the model
gemini-3-flash-preview, Reasoning Effort Low, Timeout 120 s. - Press Test Connection. You should see "Gemini answered successfully".
- Grant users the Wagos AI / User group, and template maintainers Wagos AI / Manager.
- Check Accounting → Configuration → Settings → Digitization is not set to Do not digitize for vendor bills and bank statements.
- Enter the model's rates under Wagos AI → Configuration → Model Prices so the request log shows real costs.
3. Prove it works
- Upload a vendor bill PDF. The fields fill in without spending IAP credits.
- Open Wagos AI → Request Log to see the call, its tokens and its cost.
Setup: OpenAI
Needed as a backup to Gemini (a Gemini rate limit or outage fails over to OpenAI automatically) and for generated images in Wagos AI Marketing. It can also be the default provider.
1. Get an OpenAI API key
- Sign in to the OpenAI platform. A ChatGPT subscription does not cover API usage; it is billed separately.
- Buy prepaid credits under Settings → Billing. Without credits every call fails with
429 insufficient_quota. - Turn auto-recharge off (it is on by default). The credit balance then becomes the hard spending ceiling.
- Create a project for this database and an API key inside it. Copy the key; it is shown only once.
- For images only: verify the organisation under Settings → Organization → General → Verifications.
gpt-image-1returns403until it is verified.
2. Configure Odoo
- In Settings → Wagos AI → AI Providers, paste the OpenAI API Key. Keep the model
gpt-5and image modelgpt-image-1. - Leave Default Provider on Google Gemini to use OpenAI as backup and for images only, or set it to OpenAI.
- Test Connection tests the default provider only. To test a backup key, switch the default to OpenAI, test, then switch back and save.
- Enter the OpenAI model rates under Wagos AI → Configuration → Model Prices.