{"id":15726551,"url":"https://github.com/paradite/llm-info","last_synced_at":"2025-05-13T05:32:25.228Z","repository":{"id":249261574,"uuid":"831037560","full_name":"paradite/llm-info","owner":"paradite","description":"Information on LLM models, context window token limit, output token limit, pricing and more.","archived":false,"fork":false,"pushed_at":"2025-05-05T13:09:32.000Z","size":249,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T13:15:55.141Z","etag":null,"topics":["context-window","information","language-model","llm","models","pricing","token","token-limit"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paradite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-19T14:12:58.000Z","updated_at":"2025-05-05T13:09:35.000Z","dependencies_parsed_at":"2024-07-28T06:30:47.449Z","dependency_job_id":"dc502964-cb56-43cb-af15-0c33105421cc","html_url":"https://github.com/paradite/llm-info","commit_stats":null,"previous_names":["paradite/llm-info"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradite%2Fllm-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradite%2Fllm-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradite%2Fllm-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paradite%2Fllm-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paradite","download_url":"https://codeload.github.com/paradite/llm-info/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253883121,"owners_count":21978611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["context-window","information","language-model","llm","models","pricing","token","token-limit"],"created_at":"2024-10-03T22:27:46.294Z","updated_at":"2025-05-13T05:32:25.221Z","avatar_url":"https://github.com/paradite.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llm-info\n\n[![NPM version](https://img.shields.io/npm/v/llm-info.svg?style=flat-square)](https://npmjs.org/package/llm-info)\n[![CI](https://github.com/paradite/llm-info/actions/workflows/node.js.yml/badge.svg)](https://github.com/paradite/llm-info/actions/workflows/node.js.yml)\n\nInformation on LLM models, context window token limit, output token limit, pricing and more, developed by [16x Prompt](https://prompt.16x.engineer/) and [16x Eval](https://eval.16x.engineer/) team.\n\n## Information provided\n\n- context window token limit\n- output token limit\n- pricing\n- image input support\n- `tokenizerId` for loading tokenizer from `@xenova/transformers`\n- and more\n\n## Models included\n\n- GPT-4\n- GPT-4 Turbo\n- GPT-4o\n- GPT-4o mini\n- GPT-4.1\n- GPT-4.1 mini\n- GPT-4.1 nano\n- o1\n- o1-mini\n- o1-preview\n- o3-mini\n- Claude 3.5 Sonnet\n- Claude 3.5 Haiku\n- Claude 3.7 Sonnet\n- DeepSeek-V3\n- DeepSeek-R1\n- Gemini 2.5 Pro Experimental\n\nNon-models (model-like) included:\n\n- ChatGPT\n\n## Providers supported\n\nFirst-party providers:\n\n- OpenAI\n- Anthropic\n- Azure OpenAI\n- DeepSeek\n- Google\n\nThird-party providers:\n\n- OpenRouter\n- Fireworks\n\n## Install:\n\n```bash\n$ yarn add llm-info\n```\n\n## Usage\n\n```ts\n// Models\nimport { AllModels, ModelEnum, NonModelEnum, ModelInfoMap } from 'llm-info';\n\nconsole.log(AllModels);\n/*\n[\n  'gpt-4',\n  'gpt-4-turbo',\n  'gpt-4o',\n  'gpt-4o-64k-output-alpha',\n  'gpt-4o-mini',\n  'gpt-4o-2024-08-06',\n  'o1-preview',\n  'o1-mini',\n  'o1',\n  'claude-3-5-sonnet-20240620',\n  'claude-3-5-sonnet-20241022',\n  'claude-3-5-haiku-20241022',\n  'o3-mini',\n  'claude-3-7-sonnet-20250219',\n  'deepseek-chat',\n  'deepseek-reasoner',\n  'gemini-2.5-pro-exp-03-25'\n]\n*/\n\n// Model Info\nconst modelInfo = ModelInfoMap['gpt-4o'];\nconsole.log(modelInfo);\n/*\n{\n  name: 'GPT-4o',\n  provider: 'openai',\n  contextWindowTokenLimit: 128000,\n  outputTokenLimit: 4096,\n  pricePerMillionInputTokens: 5,\n  pricePerMillionOutputTokens: 15,\n  tokenizerId: 'Xenova/gpt-4o'\n}\n*/\n\n// Providers\nimport { AI_PROVIDER_NAME_MAP } from 'llm-info';\n\nconsole.log(AI_PROVIDER_NAME_MAP);\n/*\n{\n  openai: 'OpenAI',\n  anthropic: 'Anthropic',\n  'azure-openai': 'Azure OpenAI',\n  deepseek: 'DeepSeek',\n  openrouter: 'OpenRouter',\n  google: 'Google'\n}\n*/\n\n// Tokenizer\nimport { AutoTokenizer } from '@xenova/transformers';\nconst testSentence =\n  \"Many words map to one token, but some don't: indivisible.\";\nconst results: string[] = [];\nfor (let i = 0; i \u003c AllModels.length; i++) {\n  const model = AllModels[i];\n  if (ModelInfoMap[model].tokenizerId) {\n    const tokenizer = await AutoTokenizer.from_pretrained(\n      ModelInfoMap[model].tokenizerId\n    );\n    const tokens = tokenizer.encode(testSentence);\n    results.push(`${model}: ${tokens.length}`);\n  }\n}\nconsole.log(`Test sentence: ${testSentence}\\n${results.join('\\n')}`);\n// Test sentence: Many words map to one token, but some don't: indivisible.\n// gpt-4: 15\n// gpt-4o: 14\n// gpt-4o-mini: 14\n// claude-3-5-sonnet-20240620: 16\n```\n\n## Testing\n\n```\n$ yarn test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparadite%2Fllm-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparadite%2Fllm-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparadite%2Fllm-info/lists"}