code cleanup and test fix
This commit is contained in:
@@ -844,7 +844,6 @@ async function* streamSSEResponse(response, originalModel) {
|
||||
yield { type: 'message_stop' };
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* List available models
|
||||
*/
|
||||
|
||||
@@ -399,7 +399,6 @@ export function convertAnthropicToGoogle(anthropicRequest) {
|
||||
const isClaudeModel = modelName.toLowerCase().includes('claude');
|
||||
const isClaudeThinkingModel = isClaudeModel && modelName.toLowerCase().includes('thinking');
|
||||
|
||||
|
||||
const googleRequest = {
|
||||
contents: [],
|
||||
generationConfig: {}
|
||||
@@ -629,7 +628,6 @@ export function convertGoogleToAnthropic(googleResponse, model) {
|
||||
// Handle the response wrapper
|
||||
const response = googleResponse.response || googleResponse;
|
||||
|
||||
|
||||
const candidates = response.candidates || [];
|
||||
const firstCandidate = candidates[0] || {};
|
||||
const content = firstCandidate.content || {};
|
||||
|
||||
@@ -13,7 +13,6 @@ import { TOKEN_REFRESH_INTERVAL_MS, ANTIGRAVITY_AUTH_PORT } from './constants.js
|
||||
|
||||
// Cache for the extracted token
|
||||
let cachedToken = null;
|
||||
let cachedConfig = null;
|
||||
let tokenExtractedAt = null;
|
||||
|
||||
// Antigravity's SQLite database path
|
||||
@@ -131,7 +130,6 @@ export async function getToken() {
|
||||
if (needsRefresh()) {
|
||||
const data = await getTokenData();
|
||||
cachedToken = data.apiKey;
|
||||
cachedConfig = data;
|
||||
tokenExtractedAt = Date.now();
|
||||
}
|
||||
return cachedToken;
|
||||
@@ -142,7 +140,6 @@ export async function getToken() {
|
||||
*/
|
||||
export async function forceRefresh() {
|
||||
cachedToken = null;
|
||||
cachedConfig = null;
|
||||
tokenExtractedAt = null;
|
||||
return getToken();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user