[19.0][MIG] ai_connection: Migration to 19.0 - #111
volkantasci wants to merge 7 commits into
Conversation
Currently translated at 100.0% (14 of 14 strings) Translation: ai-18.0/ai-18.0-ai_connection Translate-URL: https://translation.odoo-community.org/projects/ai-18-0/ai-18-0-ai_connection/it/
800176f to
3f2085e
Compare
Per the migration guideline task 'Add tests to increase code coverage': - base AiConnectionClient.handle_message raises NotImplementedError - _run with a system_prompt prepends it to the messages - a failing tool call goes through the tool-call error handling
|
Hi @pedrobaeza 👋 — this |
|
@etobella and @angelmoya should review /ocabot migration ai_connection |
|
Hi @etobella, @angelmoya 👋 Gentle follow-up on this
It is the last missing dependency for two other PRs: #96 ( Happy to adjust anything. Thanks for your time! |
| from odoo.orm.model_classes import add_to_registry | ||
| from odoo.tests.common import TransactionCase | ||
|
|
||
| from .fake_models import AiConnection |
There was a problem hiding this comment.
Fake models should be added in the init.
| super().setUpClass() | ||
| add_to_registry(cls.registry, AiConnection) | ||
| cls.registry._setup_models__(cls.env.cr, [AiConnection._name]) | ||
| cls.registry.init_models(cls.env.cr, [AiConnection._name], {}) |
There was a problem hiding this comment.
Cleanup is missing
Check https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-19.0#tasks-to-do-in-the-migration
Migration of
ai_connectionto 19.0, following the OCA migration guidelines:18.0(git format-patch ... | git am -3 --keep), so original authors, Weblate translations and bot commits are preserved.[MIG]commit on top carrying the actual 19.0 adaptation:19.0.1.0.0odoo_test_helper.FakeModelLoaderto the nativeadd_to_registryAPIai_toolmigration) so CI can resolve the dependency; once [19.0][MIG] ai_tool: Migration to 19.0 #110 merges I will rebase this branch onto19.0to drop the duplicated commits.This PR replaces the
ai_connectionpart of #100 (restructured per the review that the migration was not following OCA guidelines). The final tree is byte-identical to the content that passed CI there.