mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-06 23:51:15 +08:00
feat: populate content_length and max_output from official docs (#17836)
## Summary - Verify and populate `content_length` (context window) and `max_output` (max generation tokens) for all **478 chat/vision models** across **47 provider configs** - Data sourced from **official API documentation** via 12 parallel agents + targeted web verification - Update Go test assertions to match verified values Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -294,22 +294,22 @@ func TestPPIOProviderConfigLoadsIntoProviderManager(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("GetModelByName: %v", err)
|
||||
}
|
||||
if *model.MaxOutput != 64000 {
|
||||
t.Errorf("deepseek/deepseek-r1 max_tokens=%d", *model.MaxOutput)
|
||||
if *model.MaxOutput != 32768 || *model.ContentLength != 131072 {
|
||||
t.Errorf("deepseek/deepseek-r1 max_output=%d content_length=%d", *model.MaxOutput, *model.ContentLength)
|
||||
}
|
||||
model, err = pm.GetModelByName("ppio", "deepseek/deepseek-v4-pro")
|
||||
if err != nil {
|
||||
t.Fatalf("GetModelByName v4 pro: %v", err)
|
||||
}
|
||||
if *model.MaxOutput != 1048576 {
|
||||
t.Errorf("deepseek/deepseek-v4-pro max_tokens=%d", *model.MaxOutput)
|
||||
if *model.MaxOutput != 393216 || *model.ContentLength != 1048576 {
|
||||
t.Errorf("deepseek/deepseek-v4-pro max_output=%d content_length=%d", *model.MaxOutput, *model.ContentLength)
|
||||
}
|
||||
model, err = pm.GetModelByName("ppio", "deepseek/deepseek-v4-flash")
|
||||
if err != nil {
|
||||
t.Fatalf("GetModelByName v4 flash: %v", err)
|
||||
}
|
||||
if *model.MaxOutput != 1048576 {
|
||||
t.Errorf("deepseek/deepseek-v4-flash max_tokens=%d", *model.MaxOutput)
|
||||
if *model.MaxOutput != 393216 || *model.ContentLength != 1048576 {
|
||||
t.Errorf("deepseek/deepseek-v4-flash max_output=%d content_length=%d", *model.MaxOutput, *model.ContentLength)
|
||||
}
|
||||
if !model.ModelTypeMap["chat"] {
|
||||
t.Errorf("deepseek/deepseek-v4-flash missing chat type map")
|
||||
@@ -372,8 +372,8 @@ func TestSiliconFlowProviderConfigLoadsLatestProModels(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("GetModelByName DeepSeek-V4-Pro: %v", err)
|
||||
}
|
||||
if *deepSeekV4Pro.MaxOutput != 1048576 {
|
||||
t.Errorf("DeepSeek-V4-Pro max_tokens=%d", *deepSeekV4Pro.MaxOutput)
|
||||
if *deepSeekV4Pro.MaxOutput != 393216 || *deepSeekV4Pro.ContentLength != 1048576 {
|
||||
t.Errorf("DeepSeek-V4-Pro max_output=%d content_length=%d", *deepSeekV4Pro.MaxOutput, *deepSeekV4Pro.ContentLength)
|
||||
}
|
||||
if !deepSeekV4Pro.ModelTypeMap["chat"] {
|
||||
t.Errorf("DeepSeek-V4-Pro model types=%v, want chat", deepSeekV4Pro.ModelTypes)
|
||||
@@ -383,8 +383,8 @@ func TestSiliconFlowProviderConfigLoadsLatestProModels(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("GetModelByName Kimi-K2.6: %v", err)
|
||||
}
|
||||
if *kimiK26.MaxOutput != 262144 {
|
||||
t.Errorf("Kimi-K2.6 max_tokens=%d", *kimiK26.MaxOutput)
|
||||
if *kimiK26.MaxOutput != 65536 || *kimiK26.ContentLength != 262144 {
|
||||
t.Errorf("Kimi-K2.6 max_output=%d content_length=%d", *kimiK26.MaxOutput, *kimiK26.ContentLength)
|
||||
}
|
||||
if !kimiK26.ModelTypeMap["chat"] || !kimiK26.ModelTypeMap["vision"] {
|
||||
t.Errorf("Kimi-K2.6 model types=%v, want chat+vision", kimiK26.ModelTypes)
|
||||
@@ -394,7 +394,7 @@ func TestSiliconFlowProviderConfigLoadsLatestProModels(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("GetModelByName GLM-5.1: %v", err)
|
||||
}
|
||||
if *glm51.MaxOutput != 204800 {
|
||||
t.Errorf("GLM-5.1 max_tokens=%d", *glm51.MaxOutput)
|
||||
if *glm51.MaxOutput != 128000 || *glm51.ContentLength != 200000 {
|
||||
t.Errorf("GLM-5.1 max_output=%d content_length=%d", *glm51.MaxOutput, *glm51.ContentLength)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user