feat: add dynamic x-api-provider and reasoning_effort support

- Add per-model provider configuration in config.json
- Implement getModelProvider() to fetch provider from model config
- Update all header generators to accept dynamic provider parameter
- Add reasoning_effort field handling for common endpoint type
- Support auto/low/medium/high/off reasoning levels for common models

This enables flexible multi-provider support and reasoning control
across different endpoint types (anthropic, openai, common).
This commit is contained in:
1eon
2025-11-19 01:25:01 +08:00
parent c31b680d95
commit 62a384f34b
6 changed files with 70 additions and 22 deletions

View File

@@ -64,6 +64,11 @@ export function getModelReasoning(modelId) {
return null;
}
export function getModelProvider(modelId) {
const model = getModelById(modelId);
return model?.provider || null;
}
export function getUserAgent() {
return getCurrentUserAgent();
}