Skip to content
Merged
Prev Previous commit
Next Next commit
fix: eslint warnings
  • Loading branch information
chunterb committed Apr 22, 2025
commit f83e278cc86d441698faa37eda9968635cf3cf2c
2 changes: 1 addition & 1 deletion codex-cli/src/utils/model-utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { ResponseItem } from "openai/resources/responses/responses.mjs";

import { type SupportedModelId, openAiModelInfo } from "./model-info.js";
import { approximateTokensUsed } from "./approximate-tokens-used.js";
import { getBaseUrl, getApiKey } from "./config";
import { type SupportedModelId, openAiModelInfo } from "./model-info.js";
import OpenAI from "openai";

const MODEL_LIST_TIMEOUT_MS = 2_000; // 2 seconds
Expand Down
4 changes: 2 additions & 2 deletions codex-cli/tests/model-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Model Utils', () => {
});

test('calculates percentage correctly for non-empty items', () => {
const mockItems: ResponseItem[] = [
const mockItems: Array<ResponseItem> = [
{
id: 'test-id',
type: 'message',
Expand All @@ -42,7 +42,7 @@ describe('Model Utils', () => {
});

test('handles unknown models gracefully', () => {
const mockItems: ResponseItem[] = [];
const mockItems: Array<ResponseItem> = [];

expect(() => calculateContextPercentRemaining(mockItems, 'unknown-model' as any)).toThrow();
});
Expand Down