File tree Expand file tree Collapse file tree 2 files changed +2
-15
lines changed
src/test-llm-autocompletion Expand file tree Collapse file tree 2 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export interface FimResponse {
1919 tokensUsed ?: number
2020}
2121
22- function getKiloBaseUriFromToken ( kilocodeToken ?: string ) : string {
22+ export function getKiloBaseUriFromToken ( kilocodeToken ?: string ) : string {
2323 if ( kilocodeToken ) {
2424 try {
2525 const payload_string = kilocodeToken . split ( "." ) [ 1 ]
Original file line number Diff line number Diff line change 11import OpenAI from "openai"
22import { DEFAULT_HEADERS } from "../api/providers/constants.js"
3+ import { getKiloBaseUriFromToken } from "./llm-client.js"
34
45const OPUS_MODEL = "anthropic/claude-opus-4.5"
56
6- function getKiloBaseUriFromToken ( kilocodeToken ?: string ) : string {
7- if ( kilocodeToken ) {
8- try {
9- const payload_string = kilocodeToken . split ( "." ) [ 1 ]
10- const payload_json = Buffer . from ( payload_string , "base64" ) . toString ( )
11- const payload = JSON . parse ( payload_json )
12- if ( payload . env === "development" ) return "http://localhost:3000"
13- } catch ( _error ) {
14- console . warn ( "Failed to get base URL from Kilo Code token" )
15- }
16- }
17- return "https://api.kilo.ai"
18- }
19-
207export async function askOpusApproval (
218 input : string ,
229 output : string ,
You can’t perform that action at this time.
0 commit comments