mbxai 0.6.20__tar.gz → 0.6.22__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {mbxai-0.6.20 → mbxai-0.6.22}/PKG-INFO +1 -1
  2. {mbxai-0.6.20 → mbxai-0.6.22}/pyproject.toml +1 -1
  3. {mbxai-0.6.20 → mbxai-0.6.22}/setup.py +1 -1
  4. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/__init__.py +1 -1
  5. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/mcp/client.py +1 -0
  6. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/mcp/server.py +1 -1
  7. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/tools/types.py +2 -7
  8. {mbxai-0.6.20 → mbxai-0.6.22}/uv.lock +1 -1
  9. {mbxai-0.6.20 → mbxai-0.6.22}/.gitignore +0 -0
  10. {mbxai-0.6.20 → mbxai-0.6.22}/LICENSE +0 -0
  11. {mbxai-0.6.20 → mbxai-0.6.22}/README.md +0 -0
  12. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/core.py +0 -0
  13. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/mcp/__init__.py +0 -0
  14. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/mcp/example.py +0 -0
  15. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/openrouter/__init__.py +0 -0
  16. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/openrouter/client.py +0 -0
  17. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/openrouter/config.py +0 -0
  18. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/openrouter/models.py +0 -0
  19. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/tools/__init__.py +0 -0
  20. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/tools/client.py +0 -0
  21. {mbxai-0.6.20 → mbxai-0.6.22}/src/mbxai/tools/example.py +0 -0
  22. {mbxai-0.6.20 → mbxai-0.6.22}/tests/test_core.py +0 -0
  23. {mbxai-0.6.20 → mbxai-0.6.22}/tests/test_mcp.py +0 -0
  24. {mbxai-0.6.20 → mbxai-0.6.22}/tests/test_openrouter.py +0 -0
  25. {mbxai-0.6.20 → mbxai-0.6.22}/tests/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbxai
3
- Version: 0.6.20
3
+ Version: 0.6.22
4
4
  Summary: MBX AI SDK
5
5
  Project-URL: Homepage, https://www.mibexx.de
6
6
  Project-URL: Documentation, https://www.mibexx.de
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mbxai"
7
- version = "0.6.20"
7
+ version = "0.6.22"
8
8
  authors = [
9
9
  { name = "MBX AI" }
10
10
  ]
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="mbxai",
5
- version="0.6.20",
5
+ version="0.6.22",
6
6
  author="MBX AI",
7
7
  description="MBX AI SDK",
8
8
  long_description=open("README.md").read(),
@@ -2,4 +2,4 @@
2
2
  MBX AI package.
3
3
  """
4
4
 
5
- __version__ = "0.6.20"
5
+ __version__ = "0.6.22"
@@ -20,6 +20,7 @@ class MCPTool(Tool):
20
20
  input_schema: dict[str, Any]
21
21
  internal_url: str
22
22
  strict: bool = True
23
+ function: Callable[..., Any] | None = None # Make function optional during initialization
23
24
 
24
25
  def to_openai_function(self) -> dict[str, Any]:
25
26
  """Convert the tool to an OpenAI function definition."""
@@ -31,7 +31,7 @@ class MCPServer:
31
31
  self.app = FastAPI(
32
32
  title=self.name,
33
33
  description=self.description,
34
- version="0.6.20",
34
+ version="0.6.22",
35
35
  )
36
36
 
37
37
  # Initialize MCP server
@@ -61,17 +61,12 @@ def convert_to_strict_schema(schema: dict[str, Any], strict: bool = True) -> dic
61
61
  # Copy over input properties
62
62
  if "properties" in input_schema:
63
63
  for prop_name, prop in input_schema["properties"].items():
64
- # Create a new property object with required fields
64
+ # Create a new property object with only allowed fields
65
65
  new_prop = {
66
66
  "type": prop.get("type", "string"),
67
67
  "description": prop.get("description", f"The {prop_name} parameter")
68
68
  }
69
69
 
70
- # Copy over any additional fields that might be useful
71
- for key, value in prop.items():
72
- if key not in new_prop:
73
- new_prop[key] = value
74
-
75
70
  input_prop_schema["properties"][prop_name] = new_prop
76
71
  logger.info(f"Added property {prop_name}: {json.dumps(new_prop, indent=2)}")
77
72
 
@@ -101,7 +96,7 @@ class Tool(BaseModel):
101
96
  """A tool that can be used by the model."""
102
97
  name: str
103
98
  description: str
104
- function: Callable[..., Any]
99
+ function: Callable[..., Any] | None = None # Make function optional
105
100
  schema: dict[str, Any]
106
101
 
107
102
  def to_openai_function(self) -> dict[str, Any]:
@@ -446,7 +446,7 @@ wheels = [
446
446
 
447
447
  [[package]]
448
448
  name = "mbxai"
449
- version = "0.6.20"
449
+ version = "0.6.22"
450
450
  source = { editable = "." }
451
451
  dependencies = [
452
452
  { name = "fastapi" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes