- resolve the agent dir through the host getAgentDir() (registered by the composition root) instead of sniffing execPath/argv - synthesize agent_settled from the first terminal agent_end on omp - read the live model through ctx.models.current() and prefer it over the stored model on omp - adapt omp Settings (reloadFromDisk, global enabledModels) at the SDK boundary and drop scoped-model persistence on omp
This commit is contained in:
1 parent
52c9fbeaf3
commit
2aefc7ef5a
12 files changed
+232
-55
No files matched your search
@@ -83,6 +83,18 @@ test("Current model store prefers explicit Telegram model over context fallback"
|
||||
assert.equal(store.get({ model: fallback }), fallback);
|
||||
});
|
||||
|
||||
test("Current model store follows the live context model on hosts without model_select", () => {
|
||||
const stale = { provider: "stale", id: "a", name: "Stale" };
|
||||
const live = { provider: "live", id: "b", name: "Live" };
|
||||
const store = createCurrentModelStore<{ model?: typeof live }, typeof live>(
|
||||
(ctx) => ctx.model,
|
||||
true,
|
||||
);
|
||||
store.set(stale);
|
||||
assert.equal(store.get({ model: live }), live);
|
||||
assert.equal(store.get({ model: undefined }), stale);
|
||||
});
|
||||
|
||||
test("Current model runtime combines store fallback and status updates", () => {
|
||||
const fallback = { provider: "fallback", id: "f", name: "Fallback" };
|
||||
const selected = { provider: "selected", id: "s", name: "Selected" };
|
||||
|
||||
Reference in new issue
Block a user