Skip to content

Commit 9c03ec9

Browse files
committed
cache time
1 parent c4bbb98 commit 9c03ec9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/adapter/converter/vllm_converter.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func (c *VLLMConverter) ConvertToFormat(models []*domain.UnifiedModel, filters p
5050

5151
func (c *VLLMConverter) convertModel(model *domain.UnifiedModel) *profile.VLLMModel {
5252
// For vLLM, prefer the native vLLM name if available from source endpoints
53+
now := time.Now().Unix()
5354
modelID := c.findVLLMNativeName(model)
5455
if modelID == "" {
5556
// Fallback to first alias or unified ID
@@ -63,7 +64,7 @@ func (c *VLLMConverter) convertModel(model *domain.UnifiedModel) *profile.VLLMMo
6364
vllmModel := &profile.VLLMModel{
6465
ID: modelID,
6566
Object: "model",
66-
Created: time.Now().Unix(),
67+
Created: now,
6768
OwnedBy: c.determineOwner(modelID),
6869
Root: modelID, // vLLM typically sets root to the model ID
6970
}
@@ -78,7 +79,7 @@ func (c *VLLMConverter) convertModel(model *domain.UnifiedModel) *profile.VLLMMo
7879
{
7980
ID: "modelperm-olla-" + strings.ReplaceAll(modelID, "/", "-"),
8081
Object: "model_permission",
81-
Created: time.Now().Unix(),
82+
Created: now,
8283
AllowCreateEngine: false, // Engine creation not applicable in proxy context
8384
AllowSampling: true,
8485
AllowLogprobs: true,

0 commit comments

Comments
 (0)