You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Route all of ir's LLM calls through aix (the multi-provider facade) instead
of oa (OpenAI-specific), so the provider/model is switchable. ir used oa
in exactly one way — oa.prompt_function(prompt, egress=…, name=…, **kwargs) — in
four modules, all behind the lazy-import + injectable pattern.
Tests updated to the aix path (offline guards now poison aix; default-generator
tests mock aix.prompts.chat). Full suite green (399).
Live end-to-end check passed: ir.synopsis → aix.prompt_func → aix.chat →
OpenAI (gpt-4o-mini) returned a real synopsis. Injectable stubs unchanged, so import ir stays offline and tests need no network.
oa is no longer imported anywhere in ir. Default model resolution now follows aix config (default provider still OpenAI, switchable).
Part of the ecosystem-wide oa→aix direction (audit tracked in a priv issue).
Summary
Route all of
ir's LLM calls throughaix(the multi-provider facade) insteadof
oa(OpenAI-specific), so the provider/model is switchable.irusedoain exactly one way —
oa.prompt_function(prompt, egress=…, name=…, **kwargs)— infour modules, all behind the lazy-import + injectable pattern.
Done (implemented; live-verified)
aixgained the one missing facade piece (egress+nameonprompt_func) —prompt_func: add egress (output post-processor) + name, for oa.prompt_function parity thorwhalen/aix#29 (shipped, 34 prompt tests green). With that, the swap is a
near drop-in:
oa.prompt_function→aix.prompt_func.import oa→import aix):ir/synopsis.py(make_llm_synthesizer;synthesizer_idprefixoa:→aix:)ir/select.py(make_llm_selectorchooser;egress=_parse_ids)ir/formulate.py(make_llm_formulatorrewriter;egress=_parse_lines)ir/eval_gen.py(make_oa_*→make_default_*generators;egress=_parse_lines)aixpath (offline guards now poisonaix; default-generatortests mock
aix.prompts.chat). Full suite green (399).ir.synopsis → aix.prompt_func → aix.chat →OpenAI (gpt-4o-mini) returned a real synopsis. Injectable stubs unchanged, so
import irstays offline and tests need no network.oais no longer imported anywhere inir. Default model resolution now followsaixconfig (default provider still OpenAI, switchable).Part of the ecosystem-wide oa→aix direction (audit tracked in a
privissue).