Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions core/internal/llmtests/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ type ComprehensiveTestConfig struct {
VideoGenerationModel string // Model for video generation
ExternalTTSProvider schemas.ModelProvider // External TTS provider to use for testing
ExternalTTSModel string // External TTS model to use for testing
BatchExtraParams map[string]interface{} // Extra params for batch operations (e.g., role_arn, output_s3_uri for Bedrock)
FileExtraParams map[string]interface{} // Extra params for file operations (e.g., s3_bucket for Bedrock)
BatchExtraParams map[string]interface{} // Extra params for batch operations (e.g., role_arn, output_s3_uri for Bedrock)
BatchOutputFolder *schemas.BatchOutputFolder // Typed batch output location (e.g., GCS gs:// prefix for Vertex)
FileExtraParams map[string]interface{} // Extra params for file operations (e.g., s3_bucket for Bedrock)
FileStorageConfig *schemas.FileStorageConfig // Typed storage config for file operations (e.g., GCS bucket for Vertex)
DisableParallelFor []string // Test scenarios to disable parallel execution for (e.g., "Transcription" for rate-limited APIs)
ExpectRawRequestResponse bool // When true, validate rawRequest/rawResponse in ExtraFields
PassthroughModel string // Model for passthrough API tests; defaults to ChatModel when empty
Expand Down
46 changes: 28 additions & 18 deletions core/internal/llmtests/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func RunBatchCreateTest(t *testing.T, client *bifrost.Bifrost, ctx context.Conte
},
CompletionWindow: "24h",
ExtraParams: testConfig.BatchExtraParams,
OutputFolder: testConfig.BatchOutputFolder,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.BatchCreateRequest(bfCtx, request)
Expand Down Expand Up @@ -231,6 +232,7 @@ func RunBatchRetrieveTest(t *testing.T, client *bifrost.Bifrost, ctx context.Con
},
CompletionWindow: "24h",
ExtraParams: testConfig.BatchExtraParams,
OutputFolder: testConfig.BatchOutputFolder,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.BatchCreateRequest(bfCtx, createRequest)
Expand Down Expand Up @@ -358,6 +360,7 @@ func RunBatchCancelTest(t *testing.T, client *bifrost.Bifrost, ctx context.Conte
},
CompletionWindow: "24h",
ExtraParams: testConfig.BatchExtraParams,
OutputFolder: testConfig.BatchOutputFolder,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.BatchCreateRequest(bfCtx, createRequest)
Expand Down Expand Up @@ -603,9 +606,10 @@ func RunFileUploadTest(t *testing.T, client *bifrost.Bifrost, ctx context.Contex
request := &schemas.BifrostFileUploadRequest{
Provider: testConfig.Provider,
File: fileContent,
Filename: "test_batch.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
Filename: "test_batch.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
StorageConfig: testConfig.FileStorageConfig,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.FileUploadRequest(bfCtx, request)
Expand Down Expand Up @@ -672,9 +676,10 @@ func RunFileListTest(t *testing.T, client *bifrost.Bifrost, ctx context.Context,

response, err := WithFileListTestRetry(t, fileListRetryConfig, retryContext, expectations, "FileList", func() (*schemas.BifrostFileListResponse, *schemas.BifrostError) {
request := &schemas.BifrostFileListRequest{
Provider: testConfig.Provider,
Limit: 10,
ExtraParams: testConfig.FileExtraParams,
Provider: testConfig.Provider,
Limit: 10,
ExtraParams: testConfig.FileExtraParams,
StorageConfig: testConfig.FileStorageConfig,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.FileListRequest(bfCtx, request)
Expand Down Expand Up @@ -742,9 +747,10 @@ func RunFileRetrieveTest(t *testing.T, client *bifrost.Bifrost, ctx context.Cont
uploadRequest := &schemas.BifrostFileUploadRequest{
Provider: testConfig.Provider,
File: fileContent,
Filename: "test_retrieve.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
Filename: "test_retrieve.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
StorageConfig: testConfig.FileStorageConfig,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.FileUploadRequest(bfCtx, uploadRequest)
Expand Down Expand Up @@ -860,9 +866,10 @@ func RunFileDeleteTest(t *testing.T, client *bifrost.Bifrost, ctx context.Contex
uploadRequest := &schemas.BifrostFileUploadRequest{
Provider: testConfig.Provider,
File: fileContent,
Filename: "test_delete.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
Filename: "test_delete.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
StorageConfig: testConfig.FileStorageConfig,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.FileUploadRequest(bfCtx, uploadRequest)
Expand Down Expand Up @@ -978,9 +985,10 @@ func RunFileContentTest(t *testing.T, client *bifrost.Bifrost, ctx context.Conte
uploadRequest := &schemas.BifrostFileUploadRequest{
Provider: testConfig.Provider,
File: originalContent,
Filename: "test_content.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
Filename: "test_content.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
StorageConfig: testConfig.FileStorageConfig,
}
bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
return client.FileUploadRequest(bfCtx, uploadRequest)
Expand Down Expand Up @@ -1117,9 +1125,10 @@ func RunFileAndBatchIntegrationTest(t *testing.T, client *bifrost.Bifrost, ctx c
uploadRequest := &schemas.BifrostFileUploadRequest{
Provider: testConfig.Provider,
File: fileContent,
Filename: "integration_test_batch.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
Filename: "integration_test_batch.jsonl",
Purpose: "batch",
ExtraParams: testConfig.FileExtraParams,
StorageConfig: testConfig.FileStorageConfig,
}

bfCtx := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
Expand Down Expand Up @@ -1148,6 +1157,7 @@ func RunFileAndBatchIntegrationTest(t *testing.T, client *bifrost.Bifrost, ctx c
Endpoint: schemas.BatchEndpointChatCompletions,
CompletionWindow: "24h",
ExtraParams: testConfig.BatchExtraParams,
OutputFolder: testConfig.BatchOutputFolder,
}

bfCtx2 := schemas.NewBifrostContext(ctx, schemas.NoDeadline)
Expand Down
Loading
Loading