Return the backend instance matching ``config.provider``.
(config)
| 58 | |
| 59 | |
| 60 | def get_backend(config) -> "LLMBackend": |
| 61 | """Return the backend instance matching ``config.provider``.""" |
| 62 | provider = getattr(config, "provider", "openai-compatible") |
| 63 | if is_caw_provider(provider): |
| 64 | from codewiki.src.be.caw_backend import CawBackend |
| 65 | return CawBackend(config) |
| 66 | from codewiki.src.be.pydantic_ai_backend import PydanticAIBackend |
| 67 | return PydanticAIBackend(config) |
no test coverage detected