Skip to content
Open
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
1 change: 1 addition & 0 deletions constant/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type TaskPlatform string
const (
TaskPlatformSuno TaskPlatform = "suno"
TaskPlatformMidjourney = "mj"
TaskPlatformMiniMaxV2 = "minimax-video-v2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion controller/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ func RelayTask(c *gin.Context) {
ModelRatio: relayInfo.PriceData.ModelRatio,
OtherRatios: relayInfo.PriceData.OtherRatios(),
OriginModelName: relayInfo.OriginModelName,
PerCallBilling: common.StringsContains(constant.TaskPricePatches, relayInfo.OriginModelName) || relayInfo.PriceData.UsePrice,
PerCallBilling: !result.AdjustBillingOnComplete && (common.StringsContains(constant.TaskPricePatches, relayInfo.OriginModelName) || relayInfo.PriceData.UsePrice),
}
task.Quota = result.Quota
task.Data = result.TaskData
Expand Down
4 changes: 4 additions & 0 deletions relay/channel/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,7 @@ type TaskAdaptor interface {
type OpenAIVideoConverter interface {
ConvertToOpenAIVideo(originTask *model.Task) ([]byte, error)
}

type CompletionBillingAdaptor interface {
UseCompletionBilling()
}
5 changes: 5 additions & 0 deletions relay/channel/minimax/adaptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ import (
"github.com/QuantumNous/new-api/relaykit/dto"

"github.com/gin-gonic/gin"
"github.com/stretchr/testify/require"
)

func TestModelListIncludesMiniMaxH3Video(t *testing.T) {
require.Contains(t, (&Adaptor{}).GetModelList(), "MiniMax-H3")
}

func TestGetRequestURLForImageGeneration(t *testing.T) {
t.Parallel()

Expand Down
1 change: 1 addition & 0 deletions relay/channel/minimax/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var ModelList = []string{
"MiniMax-M2.5-highspeed",
"image-01",
"image-01-live",
"MiniMax-H3",
}

var ChannelName = "minimax"
Loading