| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
AI (ai_app)
• Discuss (mail) |
| Lines of code | 2042 |
| Technical Name |
ai_provider |
| License | OPL-1 |
| Website | https://tecpill.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
AI (ai_app)
• Discuss (mail) |
| Lines of code | 2042 |
| Technical Name |
ai_provider |
| License | OPL-1 |
| Website | https://tecpill.com |
AI Provider (BYOM)
Manage AI providers, governed models, capabilities, and health checks in Odoo.
ð What's New (v19.0.1.3.0)
- Rate-limit retry with configurable cap â automatic back-off on 429 responses.
- Max Tools Per Request â throttle payload size to avoid TPM limits.
- Automatic type coercion for tool arguments (string â int / array / bool).
- Selection-label coercion â models can send "high" and the right key is stored.
__end_messagestripping â prevents silent loop termination on small models.- Parallel duplicate tool-call deduplication.
Key Features
ð Multi-Provider Support
- â OpenAI (GPT-4o, GPT-4, GPT-3.5, â¦)
- â Google Gemini (via Generative AI API)
- â Azure OpenAI (deployment-based)
- â Any OpenAI-compatible endpoint (Groq, Together, Ollama, â¦)
- â Switch providers without touching agent configuration
ðï¸ Governed Model Registry
- â Register models per provider with explicit capability flags
- â Capability flags: Chat · Embeddings · Transcription
- â Bind AI agents to a specific registered model
- â Deterministic runtime model resolution â no guessing
- â Clear failure behavior for unsupported capabilities
ð¡ï¸ Resilience & Rate Limiting
- â Automatic retry on 429 â respects
Retry-After/x-ratelimit-reset-tokens - â Configurable wait cap â instant UserError instead of long freeze
- â Max Tools Per Request field to limit payload size per provider
- â Parallel duplicate tool-call deduplication
- â Health check logging per provider
ð§ Smart Tool Argument Handling
- â Auto-coerces
string â integerfor numeric fields (team_id,user_id, â¦) - â Auto-coerces
string â arrayfor many2many fields (tag_ids, â¦) - â Auto-coerces
string â booleanfor flag fields - â Translates label values to selection keys ("high" â "2" for priority)
- â
__end_messagestripping prevents silent loop termination on small models
ð Security & Compatibility
- â Secure credential storage with masked display
- â Full backward compatibility with Odoo's built-in
ai/ai_appmodules - â Respects existing
res.config.settingsAPI keys - â Role-based access via dedicated security groups
Description
Bring Your Own Model (BYOM) adds a governed multi-provider AI layer to Odoo, enabling businesses and Odoo partners to connect, manage, and control AI providers from one unified configuration model.
Instead of relying on hardcoded providers, fixed model names, or scattered runtime logic, this module introduces a structured provider architecture with explicit model governance, capability mapping, connection testing, health visibility, and secure credential handling.
BYOM is designed for teams that want flexibility, maintainability, and stronger operational control when integrating AI into Odoo.
ð¯ Why This Module
Many AI integrations are tightly coupled to one provider or depend on hardcoded runtime behavior. This makes long-term maintenance difficult and limits deployment flexibility.
BYOM solves that by introducing a clean provider abstraction layer inside Odoo, making it easier to:
- Connect different AI backends
- Manage multiple providers side by side
- Bind agents to explicitly configured models
- Reduce operational risk
- Prepare Odoo for enterprise AI governance
â Key Capabilities
- Configure multiple AI providers in a single Odoo database
- Manage governed model registries per provider
- Map capabilities explicitly for chat, embeddings, and transcription
- Resolve models deterministically to the correct provider
- Store API credentials securely with masking
- Test provider connections directly from Odoo
- Persist provider health status for better visibility
- Improve resilience with retry handling for rate limits
- Support OpenAI-compatible endpoints through a governed architecture
- Preserve compatibility with existing Odoo AI flows
ð¢ Ideal Use Cases
- Odoo partners building AI-enabled customer solutions
- Companies using private or self-hosted AI endpoints
- Teams adopting multi-provider AI strategies
- Deployments requiring governed model selection
- Organizations that need maintainable and extensible AI integration inside Odoo
ð¼ Business Value
BYOM helps organizations move from experimental AI configuration to a more governed and production-ready operating model inside Odoo. It gives teams more control over provider configuration, model ownership, operational reliability, maintainability, and future AI expansion.
ð· What Makes It Different
This module is not just a simple API connector. It introduces a governed provider layer for Odoo AI with clear separation between provider identity, runtime protocol behavior, configured model registries, and supported capabilities. That makes it more suitable for real business deployments where flexibility and control matter.
Installation Notes
ð¦ Requirements
- â Odoo 19.0 Community or Enterprise
- â Depends on
aiandai_appmodules - â No extra Python packages required (uses
urllib/requestsalready bundled) - â One-click installation â migrations run automatically
â¹ï¸ First-time setup:
- Go to Settings â AI â Providers and create your first provider.
- Add at least one model to the provider's model registry.
- Open your AI Agent and bind it to the registered model.
- Click Test Connection to verify credentials before going live.
â Rate-Limit Protection:
- Set Max Tools Per Request on the provider (e.g., 5) to reduce payload size.
- The module retries automatically on 429 â wait time is parsed from response headers.
- If wait exceeds the built-in cap (30 s), a friendly error is shown instead of freezing.
Usage Guide
1 â Enable Custom Providers
- Go to Settings â AI.
- Under Additional Providers, check Enable Custom AI Providers.
- Optionally enable Enable Provider Fallback for automatic failover.
- Click Manage Providers to open the providers list.
2 â Create a Provider
- In AI â Configuration â Providers, click New.
- Enter a Provider Name and choose the Provider Type.
- Enter your API Key and API Endpoint (e.g.,
https://api.groq.com/openai/v1). - Click Test Connection â the status bar shows Healthy on success.
3 â Configure Advanced Settings
- Open the Advanced tab inside the provider form.
- Set Max Tools per Request (e.g., 5) to prevent TPM overload on small-quota plans.
- Adjust Timeout and Max Retries as needed.
- Enable OpenAI-Compatible API if using a non-native compatible endpoint.
4 â Register Models
- Go to AI â Configuration â Models or use the Models tab inside the provider.
- Add a model â enter the exact Model Name (e.g.,
llama-3.1-8b-instant) and a Display Name. - Set capability flags: Chat, Embeddings, Transcription.
- Check Default for Chat if this is the primary model for the provider.
5 â Bind an AI Agent
- Open AI â Agents and select your agent (e.g., Livechat Groq).
- In the Provider Model field, select the registered model.
- The agent now routes all LLM calls through the configured provider automatically.
6 â Monitor Health
- The Providers list shows live Health Status (Healthy / Unhealthy / Never Tested) per provider.
- Open a provider and click the Health History tab for timestamped logs.
- Connection errors surface as clear Odoo notifications â no silent failures.
Architecture Overview
Model Hierarchy
- ai.provider â stores credentials, type, base URL, and health status
- ai.provider.model â registered model per provider with capability flags
- ai.agent â extended to hold a
provider_model_idpointer - ai.provider.health.log â timestamped health-check results per provider
- ByomApiService â service layer that routes calls to the correct backend
Support
For support and assistance, contact us at admin@tecpill.com
Credits
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module