Skip to content

Commit 93c8882

Browse files
committed
Update tracked models in config files to match new model database
1 parent ce3f082 commit 93c8882

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,25 @@ Dry run (only output to console)
5050
npx codefetch --d
5151
```
5252

53+
Count tokens only (without generating markdown file)
54+
```bash
55+
# Count tokens with default encoder
56+
npx codefetch -c
57+
58+
# Count tokens with specific encoder
59+
npx codefetch -c --token-encoder cl100k
60+
61+
# Count tokens for specific file types
62+
npx codefetch -c -e .ts,.js --token-encoder o200k
63+
```
64+
5365
If no output file is specified (`-o` or `--output`), it will print to `codefetch/codebase.md`
5466

5567
## Options
5668

5769
| Option | Description |
5870
|--------|-------------|
59-
| `-o, --output <file>` | Specify output filename (defaults to codebase.md) |
71+
| `-o, --output <file>` | Specify output filename (defaults to codebase.md). Note: If you include "codefetch/" in the path, it will be automatically stripped to avoid double-nesting |
6072
| `--dir <path>` | Specify the directory to scan (defaults to current directory) |
6173
| `--max-tokens <number>` | Limit output tokens (default: 500,000) |
6274
| `-e, --extension <ext,...>` | Filter by file extensions (e.g., .ts,.js) |
@@ -70,6 +82,7 @@ If no output file is specified (`-o` or `--output`), it will print to `codefetch
7082
| `--token-encoder <type>` | Token encoding method (simple, p50k, o200k, cl100k) |
7183
| `--disable-line-numbers` | Disable line numbers in output |
7284
| `-d, --dry-run` | Output markdown to stdout instead of file |
85+
| `-c, --token-count-only` | Output only the token count without generating markdown file |
7386

7487
All options that accept multiple values use comma-separated lists. File patterns support simple wildcards:
7588
- `*` matches any number of characters
@@ -266,11 +279,10 @@ export default {
266279

267280
// AI/LLM settings
268281
trackedModels: [
269-
"chatgpt-4o-latest",
270-
"claude-3-5-sonnet-20241022",
271-
"o1",
272-
"deepseek-v3",
273-
"gemini-exp-1206",
282+
"o3",
283+
"gemini-2.5-pro",
284+
"claude-sonnet-4",
285+
"claude-opus-4",
274286
],
275287

276288
// Prompt handling

codefetch.config.mjs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@ export default {
99
gitignore: true,
1010
tokenEncoder: "simple",
1111
tokenLimiter: "truncated",
12-
trackedModels: [
13-
"chatgpt-4o-latest",
14-
"claude-3-5-sonnet-20241022",
15-
"o1",
16-
"deepseek-v3",
17-
"gemini-exp-1206",
18-
],
12+
trackedModels: ["o3", "gemini-2.5-pro", "claude-sonnet-4", "claude-opus-4"],
1913
dryRun: false,
2014
disableLineNumbers: false,
2115
defaultPromptFile: undefined,

src/config.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface CodefetchConfig {
2121
trackedModels?: string[];
2222
dryRun?: boolean;
2323
disableLineNumbers?: boolean;
24+
tokenCountOnly?: boolean;
2425
defaultPromptFile: string;
2526
defaultChat?: string;
2627
templateVars?: Record<string, string>;
@@ -37,15 +38,10 @@ export const getDefaultConfig = (): CodefetchConfig => ({
3738
gitignore: true,
3839
tokenEncoder: "simple",
3940
tokenLimiter: "truncated",
40-
trackedModels: [
41-
"chatgpt-4o-latest",
42-
"claude-3-5-sonnet-20241022",
43-
"o1",
44-
"deepseek-v3",
45-
"gemini-exp-1206",
46-
],
41+
trackedModels: ["o3", "gemini-2.5-pro", "claude-sonnet-4", "claude-opus-4"],
4742
dryRun: false,
4843
disableLineNumbers: false,
44+
tokenCountOnly: false,
4945
defaultPromptFile: "default.md",
5046
defaultChat: "https://chat.com",
5147
templateVars: {},

0 commit comments

Comments
 (0)