Daily updates from Odoo
Thursday, January 29, 2026
1 change · master
Code cleanup and technical improvements
This update simplifies adding new AI providers to Odoo by introducing a standardized API service structure. It improves the LLM's ability to handle conversations and interactions, enabling new features like user-interactive tools and batch record updates. The refactoring also addresses previous issues with statelessness and inefficient reasoning.
Original PR description
This PR introduces a refactoring of the LLMApiService which aims to make use of inheritance in order to simplify the addition of new providers to odoo. It creates a new `AIApiService` base class that exposes 4 public methods: - `get_completions`: the main method to retrieve completions from the LLMs. - `get_embeddings`: method to retrieve the embeddings for a given input. - `get_transcription`: method to create a transcription for an audio file. - `get_realtime_session`: method to create a realtime transcription session. These methods (particularly the `get_completions` rely on overrides of private methods in the specific services to specialise the request/response cycle to a specific provider. This commit also introduce a new `AIApiServiceFactory` class which is used to initialise an `AIApiService` of proper type based on the model that is requested (i.e. OpenAIApiService for `gpt-5`, and `GoogleAIApiServie` for gemini-2.5-flash)