| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 713 |
| Technical Name |
ai_gateway |
| License | LGPL-3 |
| Website | https://arunalexgeorge.online |
AI Gateway
One BYO-key LLM gateway for every Odoo AI app.
A single, reusable gateway that your modules call to talk to Large Language Models — Anthropic (Claude), any OpenAI-compatible endpoint, local Ollama models, and a built-in Mock provider for testing. One provider abstraction, one credential store, one usage log, one cost model. You bring the key, so there is no token resale and no per-seat AI fee.
Bring Your Own Key
You supply the provider API key. Your software's running cost stays effectively zero, and keys are visible to AI Managers only (field-level security).
Tiered model routing
Call Fast / Balanced / Smart / Max and the gateway resolves the right model per provider — defaults to Claude Haiku 4.5 / Sonnet 4.6 / Opus 4.8 / Fable 5.
Usage & cost logging
Every request is logged with tokens, estimated USD cost, duration, calling module and status (OK / Refused / Error) — grouped and totalled out of the box.
Privacy & quotas
Optional PII redaction, content logging off by default, and an optional per-user daily limit for a shared free-tier provider. Multi-company record rules included.
Configure providers & API keys
Per-provider model routing + Test Connection
Every request logged — tokens & cost
Simple, private settings
For developers
Call it from any module:
res = self.env['ai.gateway'].chat(
messages=[{'role': 'user', 'content': 'Summarise this bill: ...'}],
tier='balanced', source='my_module.feature')
if res['status'] == 'ok':
text = res['text'] # + model, provider, tokens, cost_usd, duration_ms
The foundation for AI-powered Odoo
AI-OCR Invoicing · RAG "chat over your ERP" · CRM & Helpdesk copilots · report generators — all built on this one shared gateway.
Odoo 19 Community & Enterprise — License LGPL-3
By Arun A George
Website: arunalexgeorge.online
Support: admin@arunalexgeorge.online
Please log in to comment on this module