Skip to content

Commit 9c4590d

Browse files
authored
Merge pull request #297 from APIParkLab/feature/1.7-liujian
Fix: Apikey getting md5 when calling MCP Server at service level
2 parents 2dc16f4 + 7ba8a57 commit 9c4590d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

mcp-server/tool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (t *Tool) RegisterMCP(s *server.MCPServer) {
124124
}
125125
apikey := utils.Label(ctx, "apikey")
126126
if apikey != "" {
127-
req.Header.Set("Authorization", utils.Md5(apikey))
127+
req.Header.Set("Authorization", apikey)
128128
}
129129

130130
resp, err := client.Do(req)

module/ai/iml.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,8 @@ func (i *imlProviderModule) getAiProviders(ctx context.Context) ([]*gateway.Dyna
718718
}
719719
model, has := driver.GetModel(l.DefaultLLM)
720720
if !has {
721-
return nil, fmt.Errorf("model not found: %s", l.DefaultLLM)
721+
continue
722+
//return nil, fmt.Errorf("model not found: %s", l.DefaultLLM)
722723
}
723724
cfg := make(map[string]interface{})
724725
cfg["provider"] = l.Id

module/mcp/iml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ func (i *imlMcpModule) Invoke(ctx context.Context, req mcp.CallToolRequest) (*mc
270270
queryParam.Add(k, value)
271271
}
272272
case float64:
273-
queryParam.Add(k, strconv.FormatFloat(v, 'e', -1, 64))
273+
queryParam.Add(k, strconv.FormatFloat(v, 'f', -1, 64))
274274
default:
275275
return nil, fmt.Errorf("invalid query param type: %T", v)
276276
}

0 commit comments

Comments
 (0)