mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
Fix: Apikey getting md5 when calling MCP Server at service level
This commit is contained in:
+1
-1
@@ -124,7 +124,7 @@ func (t *Tool) RegisterMCP(s *server.MCPServer) {
|
||||
}
|
||||
apikey := utils.Label(ctx, "apikey")
|
||||
if apikey != "" {
|
||||
req.Header.Set("Authorization", utils.Md5(apikey))
|
||||
req.Header.Set("Authorization", apikey)
|
||||
}
|
||||
|
||||
resp, err := client.Do(req)
|
||||
|
||||
+2
-1
@@ -718,7 +718,8 @@ func (i *imlProviderModule) getAiProviders(ctx context.Context) ([]*gateway.Dyna
|
||||
}
|
||||
model, has := driver.GetModel(l.DefaultLLM)
|
||||
if !has {
|
||||
return nil, fmt.Errorf("model not found: %s", l.DefaultLLM)
|
||||
continue
|
||||
//return nil, fmt.Errorf("model not found: %s", l.DefaultLLM)
|
||||
}
|
||||
cfg := make(map[string]interface{})
|
||||
cfg["provider"] = l.Id
|
||||
|
||||
+1
-1
@@ -270,7 +270,7 @@ func (i *imlMcpModule) Invoke(ctx context.Context, req mcp.CallToolRequest) (*mc
|
||||
queryParam.Add(k, value)
|
||||
}
|
||||
case float64:
|
||||
queryParam.Add(k, strconv.FormatFloat(v, 'e', -1, 64))
|
||||
queryParam.Add(k, strconv.FormatFloat(v, 'f', -1, 64))
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid query param type: %T", v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user