Archived
chore(deps): require pi 0.82.1 and port the removed reloadConfig()
Bump @earendil-works/pi-coding-agent, pi-ai, and pi-agent-core to 0.82.1 together and raise the peer range to >=0.82.1 <0.83. All three must move in lockstep: bumping only two leaves a duplicate pi-ai copy in the tree, which surfaces as misleading type-identity errors rather than real API breaks. Pi 0.82 removed ModelRuntime.reloadConfig() and merged it into refresh(), which now does ModelConfig.load, configureRadiusProviders, and rebuildProviders before refreshing. Port the five production call sites literally, passing no options so refresh() keeps defaulting allowNetwork to modelNetworkEnabled -- which the shared runtime pins to false by constructing under PI_OFFLINE. No call site passes allowNetwork: true. The auth tests lose reloadConfig() as an observation seam, so the offline regression cases now drive removeRuntimeApiKey(), the surviving public mutation that still forwards the construction-time network flag to refresh().
This commit is contained in:
@@ -1400,7 +1400,7 @@ export class PiSessionService implements SessionRouteService {
|
||||
|
||||
async availableModels(ref: PiSessionLookup): Promise<ClientSessionModel[]> {
|
||||
const session = await this.getOrOpen(ref);
|
||||
await session.modelRuntime.reloadConfig();
|
||||
await session.modelRuntime.refresh();
|
||||
const models = session.scopedModels.length > 0
|
||||
? session.scopedModels.map((scoped) => scoped.model)
|
||||
: session.modelRuntime.getAvailableSnapshot();
|
||||
@@ -1411,7 +1411,7 @@ export class PiSessionService implements SessionRouteService {
|
||||
await this.assertWritable(ref);
|
||||
const session = await this.getOrOpen(ref);
|
||||
this.assertTreeNavigationInactive(session, "change models");
|
||||
await session.modelRuntime.reloadConfig();
|
||||
await session.modelRuntime.refresh();
|
||||
this.assertTreeNavigationInactive(session, "change models");
|
||||
const candidates = session.scopedModels.length > 0
|
||||
? session.scopedModels.map((scoped) => scoped.model)
|
||||
|
||||
Reference in New Issue
Block a user