@@ -14,9 +14,8 @@ import {
1414 resolveProviderSyntheticAuthWithPlugin ,
1515} from "../plugins/provider-runtime.js" ;
1616import { resolveRuntimeSyntheticAuthProviderRefs } from "../plugins/synthetic-auth.runtime.js" ;
17- import type { ProviderRuntimeModel } from "../plugins/types.js" ;
1817import { isRecord } from "../utils.js" ;
19- import { ensureAuthProfileStore } from "./auth-profiles.js" ;
18+ import { ensureAuthProfileStore } from "./auth-profiles/store .js" ;
2019import { resolveProviderEnvApiKeyCandidates } from "./model-auth-env-vars.js" ;
2120import { resolveEnvApiKey } from "./model-auth-env.js" ;
2221import { resolvePiCredentialMapFromStore , type PiCredentialMap } from "./pi-auth-credentials.js" ;
@@ -26,6 +25,10 @@ const PiModelRegistryClass = PiCodingAgent.ModelRegistry;
2625
2726export { PiAuthStorageClass as AuthStorage , PiModelRegistryClass as ModelRegistry } ;
2827
28+ type ProviderRuntimeModelLike = Model < Api > & {
29+ contextTokens ?: number ;
30+ } ;
31+
2932type InMemoryAuthStorageBackendLike = {
3033 withLock < T > (
3134 update : ( current : string ) => {
@@ -67,7 +70,7 @@ export function normalizeDiscoveredPiModel<T>(value: T, agentDir: string): T {
6770 ) {
6871 return value ;
6972 }
70- const model = value as unknown as ProviderRuntimeModel ;
73+ const model = value as unknown as ProviderRuntimeModelLike ;
7174 const pluginNormalized =
7275 normalizeProviderResolvedModelWithPlugin ( {
7376 provider : model . provider ,
0 commit comments