@@ -11,12 +11,17 @@ import {
1111 RpcClient ,
1212 type RpcClientOptions ,
1313} from "@earendil-works/pi-coding-agent" ;
14- import type { PosthogProviderOptions } from "@posthog/harness/extensions/posthog-provider/provider" ;
1514import { safePiEnvironment } from "./rpc-environment" ;
1615import type { PiModelOption , PiThinkingLevel } from "./types" ;
1716
1817export type PiRpcClient = RpcClient ;
1918
19+ export interface PiRpcProviderOptions {
20+ region ?: "us" | "eu" | "dev" ;
21+ apiKey : string ;
22+ baseUrl ?: string ;
23+ }
24+
2025export async function getAvailableModelsWithThinkingLevels (
2126 client : PiRpcClient ,
2227) : Promise < PiModelOption [ ] > {
@@ -70,7 +75,7 @@ function attachJsonlReader(
7075class SecurePiRpcClient extends RpcClient {
7176 constructor (
7277 private readonly secureOptions : RpcClientOptions ,
73- private readonly providerOptions : PosthogProviderOptions ,
78+ private readonly providerOptions : PiRpcProviderOptions ,
7479 ) {
7580 super ( secureOptions ) ;
7681 }
@@ -164,7 +169,7 @@ export function getPiRpcClientProcess(
164169
165170export type PiRpcClientOptions = Pick < RpcClientOptions , "cwd" | "model" > & {
166171 sessionFile ?: string ;
167- providerOptions : PosthogProviderOptions & { apiKey : string } ;
172+ providerOptions : PiRpcProviderOptions ;
168173} ;
169174
170175export function createPiRpcClient ( options : PiRpcClientOptions ) : PiRpcClient {
0 commit comments