Initial commit

Co-Authored-By: Quentin Torroba <quentin.torroba@mistral.ai>
Co-Authored-By: Laure Hugo <laure.hugo@mistral.ai>
Co-Authored-By: Benjamin Trom <benjamin.trom@mistral.ai>
Co-Authored-By: Mathias Gesbert <mathias.gesbert@ext.mistral.ai>
Co-Authored-By: Michel Thomazo <michel.thomazo@mistral.ai>
Co-Authored-By: Clément Drouin <clement.drouin@mistral.ai>
Co-Authored-By: Vincent Guilloux <vincent.guilloux@mistral.ai>
Co-Authored-By: Valentin Berard <val@mistral.ai>
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Quentin Torroba 2025-12-09 13:13:22 +01:00 committed by Quentin Torroba
commit fa15fc977b
200 changed files with 30484 additions and 0 deletions

View file

@ -0,0 +1,16 @@
from __future__ import annotations
from contextlib import contextmanager
from vibe.core.config import Backend
from vibe.core.llm.backend.factory import BACKEND_FACTORY
@contextmanager
def mock_backend_factory(backend_type: Backend, factory_func):
original = BACKEND_FACTORY[backend_type]
try:
BACKEND_FACTORY[backend_type] = factory_func
yield
finally:
BACKEND_FACTORY[backend_type] = original