Commit Graph

14 Commits

Author SHA1 Message Date
longkeyy
18fc5fc0be feat: implement model alias system for unified model names
- Add comprehensive model alias mapping system in relay/model/alias.go
- Support standard model names (gpt-4o, claude-3-sonnet) across different channels
- Modify AddAbilities() to create aliases for both standard and channel-specific names
- Update text processing to resolve aliases before channel-specific mapping
- Enhance billing system to support alias-based model ratio lookup
- Add comprehensive tests for alias resolution and reverse mapping
- Support major providers: OpenRouter, Anthropic, Gemini, Groq

This allows users to use consistent model names (e.g., 'gpt-4o')
regardless of channel provider, with automatic mapping to
channel-specific names (e.g., 'openai/gpt-4o' for OpenRouter).
2025-08-27 02:24:38 +08:00
JustSong
44233d5c04 feat: add completion tokens details and reasoning effort fields to model (close #2050) 2025-02-09 18:14:01 +08:00
JustSong
07808122a6 fix: fix Debugf not using DebugEnabled (close #2068) 2025-02-09 10:57:22 +08:00
JustSong
a3d7df7f89 feat: update GeneralOpenAIRequest 2024-11-09 23:43:08 +08:00
wanthigh
c368232f50
fix: changeoptional field to pointer type (#1907)
* fix:修复在渠道配置中设置模型重定向时,temperature为0被忽略的问题

* fix: set optional fields to pointer type

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-11-09 23:31:46 +08:00
JustSong
f75a17f8eb feat: always return usage in stream mode 2024-10-27 17:58:44 +08:00
majian
89b63ca96f
feat: ResponseFormat support json_schema (#1759)
* feat: responseFormat support json_schema

* chore: rename struct name

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-09-21 22:35:24 +08:00
MotorBottle
04bb3ef392
feat: add Max Tokens and Context Window Setting Options for Ollama Channel (#1694)
* Update main.go with max_tokens param

* Update model.go with max_tokens param

* Update model.go

* Update main.go

* Update main.go

* Adds num_ctx param for Ollama Channel

* Added num_ctx param for ollama adapter

* Added num_ctx param for ollama adapter

* Improved data process logic
2024-08-06 23:44:37 +08:00
F1ynn Zhan9
422a4e8ee5
feat: add field stop in GeneralOpenAIRequest (#1637) 2024-07-14 17:57:16 +08:00
Mikey
0fc07ea558
feat: add support for Claude 3 tool use (function calling) (#1587)
* feat: add tool support for AWS & Claude

* fix: add {} for openai compatibility in streaming tool_use
2024-07-02 00:12:01 +08:00
Mo
d4347e7a35
feat: support Ali stable-diffusion-xl and wanx-v1 model (#1240)
* Fix ali ConvertRequest function to use baidu keyword

* Support Ali stable-diffusion-xl and wanx-v1 model

* Support Ali stable-diffusion-xl and wanx-v1 model

* Support Ali stable-diffusion-xl and wanx-v1 model

* chore: update ali constants and model ratio

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
2024-04-05 18:09:54 +08:00
JustSong
06a3fc5421 chore: update GeneralOpenAIRequest 2024-03-31 22:23:42 +08:00
JustSong
2ba28c72cb feat: support function call for ali (close #1242) 2024-03-30 10:43:26 +08:00
JustSong
1aa374ccfb refactor: use adaptor to do relay & test 2024-02-18 00:15:31 +08:00