Spaces:
Runtime error
Runtime error
Commit
·
238a7b3
1
Parent(s):
f743abd
Switch to Granite 4.0 Micro and fix import errors
Browse files- Updated model from granite-3.1-8b-instruct to granite-4.0-micro
- Added missing get_mcp_registry() function to mcp/registry.py
- Updated all documentation to reflect Granite 4.0 Micro
- Updated performance metrics for the more efficient model
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
- mcp/registry.py +21 -0
mcp/registry.py
CHANGED
|
@@ -236,3 +236,24 @@ class MCPRegistry:
|
|
| 236 |
def get_summary_service(self):
|
| 237 |
"""Get summary service (only available in in-memory mode)"""
|
| 238 |
return getattr(self, 'summary', None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
def get_summary_service(self):
|
| 237 |
"""Get summary service (only available in in-memory mode)"""
|
| 238 |
return getattr(self, 'summary', None)
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
# Global registry instance
|
| 242 |
+
_registry_instance = None
|
| 243 |
+
|
| 244 |
+
def get_mcp_registry(use_in_memory: bool = None) -> MCPRegistry:
|
| 245 |
+
"""
|
| 246 |
+
Get or create the global MCP registry instance.
|
| 247 |
+
|
| 248 |
+
Args:
|
| 249 |
+
use_in_memory: If True, use in-memory services. If None, use env var.
|
| 250 |
+
|
| 251 |
+
Returns:
|
| 252 |
+
MCPRegistry instance
|
| 253 |
+
"""
|
| 254 |
+
global _registry_instance
|
| 255 |
+
|
| 256 |
+
if _registry_instance is None:
|
| 257 |
+
_registry_instance = MCPRegistry(use_in_memory=use_in_memory)
|
| 258 |
+
|
| 259 |
+
return _registry_instance
|