[Bug Fix] - QA for MCP Gateway - show the cost config on the root of MCP Settings (#12526)

* show cost display

* fixes MCP cost display
This commit is contained in:
Ishaan Jaff 2025-07-11 17:34:34 -07:00 • committed by GitHub
parent 7ac187b269
commit 4f9793951d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View file

@ -15,9 +15,6 @@ const MCPServerCostDisplay: React.FC<MCPServerCostDisplayProps> = ({ costConfig
return (
<div className="mt-6 pt-6 border-t border-gray-200">
<div className="space-y-4">
<div>
<Text className="font-medium text-lg">Cost Configuration</Text>
</div>
<div className="p-4 bg-gray-50 border border-gray-200 rounded-lg">
<Text className="text-gray-600">
No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call.
@ -31,9 +28,6 @@ const MCPServerCostDisplay: React.FC<MCPServerCostDisplayProps> = ({ costConfig
return (
<div className="mt-6 pt-6 border-t border-gray-200">
<div className="space-y-4">
<div>
<Text className="font-medium text-lg">Cost Configuration</Text>
</div>
{hasDefaultCost && costConfig?.default_cost_per_query !== undefined && costConfig?.default_cost_per_query !== null && (
<div>

View file

@ -211,6 +211,10 @@ export const MCPServerView: React.FC<MCPServerViewProps> = ({
)}
</div>
</div>
<div>
<Text className="font-medium">Cost Configuration</Text>
<MCPServerCostDisplay costConfig={mcpServer.mcp_info?.mcp_server_cost_info} />
</div>
</div>
)}
</Card>