Repository navigation
Conversation
|
Hi @jazzbox35 . I was reading this PR against the design we agreed on What works well
Where it diverges from the design. The router returns a label (
Smaller points, but still important in my view:
Suggested changes. In my opinion, these are the changes that would bring the PR in line
Separately, the On gatway and the wider architecture. As defined in OMEGA-282 (09-18), the router only decides; the credentials and the per-agent usage and cost accounting belong to a separate layer, LiteLLM (or some other in the meantime), which every LLM call goes through (nginx keeps the keys in the meantime, without counting). This PR neither resolves that nor conflicts with it: the router holds no keys and makes no calls, which is right. But routing makes escalation to a premium model possible, and until the gateway (like litellm) is in place nothing counts what that costs per agent. So I'd see the gateway layer as the next step after routing rather than part of this PR, and it is the same separation of infrastructure from the agent core that OMEGA-360 asks for. The suggested changes below keep the router's contract (it returns the provider and model, nothing more), so the router can later move behind that layer, or into its own container, without changing core again. In a separate comment below to be posted soon, I suggest concrete code-level changes along these lines. I suggest to wait for that comment and then read all together, as they will hopefully will make more sense and then discuss. [I have just learned at the last moment when publishing this comment that there is OMEGA-427 ticket which deals with the format of the calls and LLM router depends on it. cc @vsbogd , given that you are doing that ticket, please comment how you see we can align, if needed.] -- thanks! Tracking: OMEGA-376. AI-assisted. This review was prepared with AI assistance. I'm posting it, and I'm responsible for its content. The team, by the names used in commits and mail:
|
|
Hi @jazzbox35, here is the code-level follow-up to my review above: its suggestions, implemented and tested on top of your branch ( What's on our fork
Your keyword policy and What changes in the call path flowchart LR
subgraph now["#373 now"]
direction LR
R1["router"] -- "label: premium_model" --> O1["openrouter.py<br/>picks the model"]
R1 -. "label ignored" .-> X1["other providers"]
end
subgraph prop["Proposed"]
direction LR
R2["router plugin"] -- "(provider, model)<br/>from the catalogue" --> C2["core fills the<br/>request, checks<br/>the catalogue"]
C2 --> P2["any provider<br/>sends request.model"]
P2 --> G2["gateway adds the key<br/>(nginx now, LiteLLM later)"]
end
Because the chosen model is now in the request, the test mock can report it, and CI can check routing for every provider. Status
Read in order, #11 → #16. Comments are welcome on the PRs or here, and I'm happy to go through it together in a call. AI-generated code, proposed for review; I'm responsible for it. Agents: |
Description
Change the docker startup script so that if the user selects openrouter as provider and enters a specific model, the user is then prompted to input an optional premium model. The first model entered is the default LLM (typically the "economy" model for simpler calls). If the user elects to input a premium model too, it must be a valid openrouter model, and this is used for more complicated LLM calls.
There is a new "default.metta" program in a new ./router directory which does some basic searching over the input message from the user chat and also tool call results.
Important note: the new API tool call format is included here -- the starting point is python objects not the old prompt.
Secondly: this is intended just to be the start of possible routers, and this is just a simple start at the outset.
How Has This Been Tested?
It does appear to work -- however this is a draft only PR for now.
Checklist