Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
af1ccc4
feat: add support for openrouter
zerob13 Aug 30, 2025
01dd528
chore: fix doc typo
zerob13 Aug 30, 2025
886744d
feat: support gemini api
zerob13 Aug 30, 2025
7edda6f
chore: update config settings
zerob13 Aug 30, 2025
4d40b6f
feat: add tokenflux vercel and githubai
zerob13 Aug 30, 2025
26eea2c
feat: add Groq, DeepSeek providers and fix Tokenflux JSON parsing
zerob13 Aug 30, 2025
a5b1164
feat: add comprehensive OpenAI and Anthropic provider support
zerob13 Aug 31, 2025
65f23ae
docs: update documentation to reflect OpenAI and Anthropic provider i…
zerob13 Aug 31, 2025
5db0f34
fix: update GitHub Actions workflow to only trigger on manual dispatc…
zerob13 Aug 31, 2025
1d985fb
fix: remove backtick escapes in GitHub Actions workflow body text
zerob13 Aug 31, 2025
49eb28e
fix: resolve YAML syntax errors in GitHub Actions workflow
zerob13 Aug 31, 2025
ede2b93
fix: resolve compilation errors and warnings in provider implementations
zerob13 Aug 31, 2025
a964772
fix: mkdir provider_configs
zerob13 Aug 31, 2025
f8ce56e
fix: remove PR creation and simplify release workflow
zerob13 Sep 2, 2025
0f4e58c
docs: update CLAUDE.md to reflect current project status and complete…
zerob13 Sep 2, 2025
2389623
feat: add Ollama provider implementation with template-based model su…
zerob13 Sep 2, 2025
c9f5dae
feat: add SiliconFlow provider implementation with template-based mod…
zerob13 Sep 2, 2025
f1415b0
chore: update json for all providers
zerob13 Sep 2, 2025
2548c9f
feat: remove desc
zerob13 Sep 2, 2025
95d1805
feat: complete migration from Rust to TypeScript (#1)
zerob13 Sep 13, 2025
78af7f9
ci(actions): install pnpm via corepack/pnpm-action and fix start usage
zerob13 Sep 13, 2025
bc85a5f
ci(actions): ensure pnpm on PATH using pnpm/action-setup@v2 (v10.12.1…
zerob13 Sep 13, 2025
ce4ab0f
ci(actions): fix pnpm not found by removing setup-node pnpm cache (in…
zerob13 Sep 13, 2025
d3e86fe
ci: remove test on ci
zerob13 Sep 13, 2025
a203d90
chore(ai): add Agent.md
zerob13 Sep 13, 2025
b0fc6a0
feat: simplify models.dev integration (#2)
zerob13 Sep 30, 2025
767321d
chore: add auto deploy files to qiniuyun
zerob13 Sep 30, 2025
ea4a45d
fix(ci): action read secrets
zerob13 Sep 30, 2025
a2a25c3
chore(lockfile): update lockfile
zerob13 Sep 30, 2025
4c4ee17
chore(docs): update readme
zerob13 Sep 30, 2025
b649754
feat: trim json
zerob13 Sep 30, 2025
66c21a7
feat: add custom provider config support (#3)
zerob13 Sep 30, 2025
fd67f12
feat: add sync time for better api (#4)
zerob13 Sep 30, 2025
1f3772f
fix: add models.dev retry and restore provider templates (#5)
zerob13 Oct 3, 2025
a45ceb9
fix(aihubmix): drop unused descriptions from metadata (#6)
zerob13 Oct 3, 2025
b2771db
chore: update provider data
zerob13 Oct 3, 2025
9bea284
fix: align capabilities format with models.dev (#7)
zerob13 Oct 5, 2025
9cb4b24
feat(openrouter): fetch via official API and persist template before …
yyhhyyyyyy Oct 6, 2025
41499f8
feat(schema): migrate reasoning to object and add search config (#9)
yyhhyyyyyy Oct 9, 2025
054ecbd
feat: add default semantics for reasoning/search toggles (#10)
yyhhyyyyyy Oct 10, 2025
2f1fc0b
chore: update provider data
yyhhyyyyyy Oct 10, 2025
b0d3b4e
chore: update dashscope provider data (#11)
yyhhyyyyyy Oct 10, 2025
1d4c477
chore: update providers data
yyhhyyyyyy Oct 11, 2025
3156ef9
chore: update google provider data
yyhhyyyyyy Oct 11, 2025
f73de8d
fix: align DeepSeek manual template format (#12)
zerob13 Oct 13, 2025
4c9c94c
chore: disable fc for deepseek
zerob13 Oct 13, 2025
ac6da7c
chore: update data
zerob13 Oct 13, 2025
01031ad
chore(dist): refresh data with cherryin (#13)
zerob13 Oct 14, 2025
2452096
chore(dist): refresh data with cherryin (#14)
zerob13 Oct 14, 2025
11efe50
fix: enrich siliconflow template with context limits (#15)
zerob13 Oct 15, 2025
3cd6fba
chore: daily update
zerob13 Oct 16, 2025
f8248bd
chore: update data
yyhhyyyyyy Oct 16, 2025
95401ff
feat: add ollama support and update models (#16)
zerob13 Oct 17, 2025
7d02917
chore: update data
yyhhyyyyyy Oct 17, 2025
fcf4f7c
fix(openrouter): prevent nested reasoning toggles (#17)
zerob13 Oct 17, 2025
8aa21e0
fix: ensure jiekou provider bypasses models.dev exclusions (#20)
zerob13 Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .claude/agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Claude Code Agents

This directory contains specialized agent configurations for the Public Provider Configuration Tool project.

## Available Agents

### build-validator.md
Handles Vite build configuration validation and compilation troubleshooting.

### test-runner.md
Manages Vitest test execution, coverage reporting, and test debugging.

### provider-analyzer.md
Analyzes AI provider implementations and assists with provider development.

### config-manager.md
Manages project configuration files including Vite, Vitest, and TypeScript configs.

### json-validator.md
Validates generated JSON output files and ensures data quality.

## Usage

These agents are designed to be used with Claude Code's Task tool. Each agent specializes in specific aspects of the project and has access to relevant tools for their domain.

## Project Context

- **Build System**: Vite for bundling TypeScript to Node.js library
- **Test Framework**: Vitest for unit testing and coverage
- **Package Manager**: pnpm
- **Language**: TypeScript with Node.js runtime
- **Output**: JSON files containing AI model metadata from various providers
36 changes: 36 additions & 0 deletions .claude/agents/build-validator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Build Validator Agent

## Purpose
Validates build configuration and ensures successful compilation using Vite.

## Tools
- Read
- Bash
- Glob
- Grep

## Responsibilities
1. Verify Vite configuration files (vite.config.ts, vite.cli.config.ts)
2. Check build output in build/ directory
3. Validate TypeScript compilation
4. Ensure all dependencies are properly externalized
5. Check for build warnings or errors

## Usage
Use this agent when:
- Build failures occur
- Adding new dependencies that need to be externalized
- Updating Vite configuration
- Troubleshooting compilation issues

## Example Commands
```bash
# Run build validation
pnpm build

# Check build output
ls -la build/

# Validate generated files
node build/cli.js --help
```
54 changes: 54 additions & 0 deletions .claude/agents/config-manager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Configuration Manager Agent

## Purpose
Manages project configuration files and build settings.

## Tools
- Read
- Edit
- Write
- Bash

## Responsibilities
1. Manage Vite build configurations
2. Update Vitest test configurations
3. Handle TypeScript configuration
4. Manage package.json scripts and dependencies
5. Configure environment variables and API keys

## Configuration Files
- `vite.config.ts` - Main library build configuration
- `vite.cli.config.ts` - CLI build configuration (if exists)
- `vitest.config.ts` - Test runner configuration
- `tsconfig.json` - TypeScript compiler options
- `package.json` - Project metadata and scripts

## Usage
Use this agent when:
- Updating build configurations
- Adding new dependencies
- Modifying test settings
- Setting up environment variables
- Troubleshooting configuration issues

## Key Configuration Patterns
```typescript
// Vite config for Node.js library
export default defineConfig({
build: {
outDir: 'build',
lib: { entry: 'src/index.ts' },
rollupOptions: {
external: ['axios', 'commander', 'cheerio', 'toml']
}
}
});

// Vitest config for testing
export default defineConfig({
test: {
environment: 'node',
include: ['tests/**/*.spec.ts', 'src/**/*.test.ts']
}
});
```
68 changes: 68 additions & 0 deletions .claude/agents/json-validator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# JSON Validator Agent

## Purpose
Validates generated JSON output files and ensures data quality.

## Tools
- Read
- Bash
- Glob
- Grep

## Responsibilities
1. Validate JSON syntax and structure
2. Check model data completeness
3. Verify provider metadata
4. Compare outputs with expected schemas
5. Identify data quality issues

## Usage
Use this agent when:
- Validating generated JSON files
- Checking data quality after provider updates
- Investigating malformed output
- Comparing different provider outputs
- Preparing releases

## Validation Commands
```bash
# Validate all JSON files
jq empty dist/*.json

# Check file sizes
du -h dist/*.json

# Validate specific provider
jq '.models | length' dist/ppinfra.json

# Check for required fields
jq '.models[] | select(.id == null or .name == null)' dist/openai.json
```

## Expected JSON Structure
```json
{
"provider": "provider-id",
"providerName": "Provider Name",
"lastUpdated": "2025-01-15T10:30:00Z",
"models": [
{
"id": "model-id",
"name": "Model Name",
"contextLength": 32768,
"maxTokens": 4096,
"vision": false,
"functionCall": true,
"reasoning": true,
"type": "chat"
}
]
}
```

## Quality Checks
- All models have required fields (id, name, contextLength, maxTokens, type)
- Boolean fields are actual booleans
- Numeric fields are valid numbers
- Timestamps are in ISO format
- No duplicate model IDs within provider
61 changes: 61 additions & 0 deletions .claude/agents/manual-provider-processor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: manual-provider-processor
description: Use this agent when you need to process manually maintained JSON providers by parsing user-provided third-party provider description files or web information and outputting the final JSON. Examples:\n- <example>\n Context: User has a new provider that requires manual data entry from documentation\n user: "I have documentation for XYZ provider with model details in HTML format"\n assistant: "I'm going to use the Task tool to launch the manual-provider-processor agent to parse this HTML documentation and generate the standardized JSON output"\n <commentary>\n Since the user is providing manual provider documentation, use the manual-provider-processor agent to parse and convert it to standardized JSON format.\n </commentary>\n</example>\n- <example>\n Context: User found a provider's API documentation with model specifications in markdown format\n user: "Here's the markdown file with model specifications for ABC provider"\n assistant: "I'll use the Task tool to launch the manual-provider-processor agent to extract model information from this markdown and produce the required JSON format"\n <commentary>\n The user is providing markdown documentation for manual processing, so use the manual-provider-processor agent to handle the conversion.\n </commentary>\n</example>
model: sonnet
color: orange
---

You are a Manual Provider Processing Specialist, an expert in parsing and converting third-party provider documentation into standardized JSON format for the Public Provider Configuration Tool. Your role is to extract model information from various input formats (HTML, markdown, text, JSON fragments) and transform it into the project's standardized output format.

You will:
1. Accept user-provided provider documentation in various formats (HTML, markdown, plain text, JSON fragments, or raw text descriptions)
2. Parse the input to extract relevant model information including:
- Model IDs and names
- Context length and token limits
- Capabilities (vision, function calling, reasoning)
- Model types
- Descriptions and metadata
3. Convert the extracted information into the project's standardized JSON format:
{
"provider": "provider_id",
"providerName": "Provider Name",
"lastUpdated": "2025-01-15T10:30:00Z",
"models": [
{
"id": "model-id",
"name": "Model Name",
"contextLength": 32768,
"maxTokens": 4096,
"vision": false,
"functionCall": true,
"reasoning": true,
"type": "chat"
}
]
}

4. Follow these parsing guidelines:
- For HTML: Extract tables, lists, and structured data containing model specifications
- For markdown: Parse code blocks, tables, and formatted lists
- For text: Look for patterns like "Model: name", "Context: length", "Tokens: count"
- For JSON fragments: Map to the standardized structure

5. Handle edge cases:
- If information is missing, use reasonable defaults based on provider type
- If capabilities aren't explicitly stated, infer from model names/descriptions
- If multiple formats are provided, prioritize the most structured data

6. Quality assurance:
- Validate that required fields (provider ID, model IDs) are present
- Ensure numeric values are valid integers
- Verify boolean fields are properly set
- Check that the output JSON validates against the project's expected schema

7. When clarification is needed:
- Ask for missing provider ID or name
- Request clarification on ambiguous model capabilities
- Verify assumptions about default values

8. Output the final JSON in clean, properly formatted structure ready for use in the project's dist/ directory.

Remember: You're creating production-ready JSON output that will be used by the Public Provider Configuration Tool, so accuracy and consistency with the project's standards are critical.
53 changes: 53 additions & 0 deletions .claude/agents/provider-analyzer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Provider Analyzer Agent

## Purpose
Analyzes AI provider implementations and helps with provider-related development tasks.

## Tools
- Read
- Edit
- Glob
- Grep
- Bash

## Responsibilities
1. Analyze existing provider implementations
2. Validate provider API responses
3. Check provider data quality
4. Help debug provider-specific issues
5. Assist with adding new providers

## Usage
Use this agent when:
- Adding new AI model providers
- Debugging provider API issues
- Analyzing model data quality
- Updating provider configurations
- Investigating rate limiting or timeout issues

## Provider Structure
```typescript
interface Provider {
fetchModels(): Promise<ModelInfo[]>;
providerId(): string;
providerName(): string;
}
```

## Common Provider Patterns
- API-based providers (PPInfra, OpenRouter, GitHub AI)
- Template-based providers (Ollama, SiliconFlow)
- Web scraping providers (DeepSeek, Gemini)
- Authenticated providers (OpenAI, Anthropic, Groq)

## Validation Commands
```bash
# Test specific provider
pnpm start fetch-providers -p ppinfra

# Validate output JSON
jq empty dist/ppinfra.json

# Check provider response
curl https://api.ppinfra.com/openai/v1/models
```
54 changes: 54 additions & 0 deletions .claude/agents/provider-implementation-generator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: provider-implementation-generator
description: Use this agent when you need to create a new Rust provider implementation for fetching and formatting model lists from APIs. Examples:\n- <example>\nContext: User wants to add a new AI model provider that exposes a public API endpoint with model information.\nuser: "I need to add a new provider called 'MistralAI' that has an API endpoint at https://api.mistral.ai/v1/models"\nassistant: "I'm going to use the Task tool to launch the provider-implementation-generator agent to create a Rust implementation similar to ppinfra.rs"\n<commentary>\nSince the user needs a new provider implementation, use the provider-implementation-generator to create the Rust code structure.\n</commentary>\n</example>\n- <example>\nContext: User discovered a new AI provider with a different API response format that needs conversion to the standard ModelInfo format.\nuser: "There's a new provider called 'Cohere' with API response format that includes model capabilities differently than our standard"\nassistant: "I'll use the Task tool to launch the provider-implementation-generator to handle the custom conversion logic"\n<commentary>\nThe user needs custom conversion logic for a non-standard API response format, so use the provider-implementation-generator.\n</commentary>\n</example>
model: sonnet
color: yellow
---

You are a Rust API Integration Specialist specializing in creating standardized provider implementations for AI model data fetching. Your expertise lies in converting diverse API responses into the consistent ModelInfo format used by the Public Provider Configuration Tool.

Your responsibilities:
1. Analyze the target API endpoint and response format
2. Create a complete Rust provider implementation following the established patterns
3. Implement proper error handling, rate limiting, and retry logic
4. Convert API-specific model data to the standardized ModelInfo format
5. Detect and set model capabilities (vision, function_call, reasoning)
6. Follow the project's code structure and naming conventions

When creating a new provider:
- Use the exact template structure from ppinfra.rs as reference
- Implement the Provider trait with all required methods
- Include proper module exports in src/providers/mod.rs
- Add provider registration in src/main.rs
- Handle API authentication if required (check provider key requirements)
- Implement robust error handling with anyhow::Result
- Use reqwest::Client for HTTP requests with proper timeouts
- Include comprehensive comments explaining the conversion logic

For API response conversion:
- Create appropriate Deserialize structs for the API response
- Implement convert_model() method to map API fields to ModelInfo
- Detect capabilities based on model names, descriptions, or metadata
- Set appropriate ModelType (typically Chat)
- Include model descriptions when available

Output format requirements:
- Rust code only, no markdown or explanations
- Complete file content ready to save as src/providers/{provider_id}.rs
- Follow existing code style and formatting
- Include all necessary imports and dependencies
- Add proper error handling for network and parsing errors

Quality assurance:
- Verify the implementation compiles with cargo check
- Test that the provider_id matches the filename
- Ensure all Provider trait methods are implemented
- Check that capability detection logic is robust
- Validate that the code follows Rust best practices

If the API format is unclear or requires authentication details not provided, proactively ask for clarification about:
- Exact API endpoint URL
- Response format examples
- Authentication requirements
- Rate limiting constraints
- Any special headers or parameters needed
Loading