code-puppy 0.0.35__tar.gz → 0.0.37__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 (27) hide show
  1. {code_puppy-0.0.35 → code_puppy-0.0.37}/PKG-INFO +1 -1
  2. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/model_factory.py +12 -5
  3. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/models.json +12 -1
  4. {code_puppy-0.0.35 → code_puppy-0.0.37}/pyproject.toml +1 -1
  5. {code_puppy-0.0.35 → code_puppy-0.0.37}/.gitignore +0 -0
  6. {code_puppy-0.0.35 → code_puppy-0.0.37}/LICENSE +0 -0
  7. {code_puppy-0.0.35 → code_puppy-0.0.37}/README.md +0 -0
  8. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/__init__.py +0 -0
  9. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/agent.py +0 -0
  10. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/agent_prompts.py +0 -0
  11. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/command_line/__init__.py +0 -0
  12. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/command_line/file_path_completion.py +0 -0
  13. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/command_line/meta_command_handler.py +0 -0
  14. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/command_line/model_picker_completion.py +0 -0
  15. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
  16. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/command_line/utils.py +0 -0
  17. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/config.py +0 -0
  18. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/main.py +0 -0
  19. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/session_memory.py +0 -0
  20. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/tools/__init__.py +0 -0
  21. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/tools/code_map.py +0 -0
  22. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/tools/command_runner.py +0 -0
  23. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/tools/common.py +0 -0
  24. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/tools/file_modifications.py +0 -0
  25. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/tools/file_operations.py +0 -0
  26. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/tools/web_search.py +0 -0
  27. {code_puppy-0.0.35 → code_puppy-0.0.37}/code_puppy/version_checker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.35
3
+ Version: 0.0.37
4
4
  Summary: Code generation agent
5
5
  Author: Michael Pfaffenberger
6
6
  License: MIT
@@ -139,11 +139,11 @@ def get_custom_config(model_config):
139
139
  ca_certs_path = custom_config.get("ca_certs_path")
140
140
 
141
141
  api_key = None
142
- if "api_key" in model_config:
143
- if model_config["api_key"].startswith("$"):
144
- api_key = os.environ.get(model_config["api_key"][1:])
142
+ if "api_key" in custom_config:
143
+ if custom_config["api_key"].startswith("$"):
144
+ api_key = os.environ.get(custom_config["api_key"][1:])
145
145
  else:
146
- api_key = model_config["api_key"]
146
+ api_key = custom_config["api_key"]
147
147
  return url, headers, ca_certs_path, api_key
148
148
 
149
149
 
@@ -186,6 +186,14 @@ class ModelFactory:
186
186
 
187
187
  return OpenAIModel(model_name=model_config["name"], provider=provider)
188
188
 
189
+ elif model_type == "anthropic":
190
+ api_key = os.environ.get("ANTHROPIC_API_KEY", None)
191
+ if not api_key:
192
+ raise ValueError('ANTHROPIC_API_KEY environment variable must be set for Anthropic models.')
193
+ anthropic_client = AsyncAnthropic(api_key=api_key)
194
+ provider = AnthropicProvider(anthropic_client=anthropic_client)
195
+ return AnthropicModel(model_name=model_config["name"], provider=provider)
196
+
189
197
  elif model_type == "custom_anthropic":
190
198
  url, headers, ca_certs_path, api_key = get_custom_config(model_config)
191
199
  client = httpx.AsyncClient(headers=headers, verify=ca_certs_path)
@@ -195,7 +203,6 @@ class ModelFactory:
195
203
  api_key=api_key,
196
204
  )
197
205
  provider = AnthropicProvider(anthropic_client=anthropic_client)
198
-
199
206
  return AnthropicModel(model_name=model_config["name"], provider=provider)
200
207
 
201
208
  elif model_type == "custom_openai":
@@ -89,5 +89,16 @@
89
89
  "url": "https://api.together.xyz/v1",
90
90
  "api_key": "$TOGETHER_API_KEY"
91
91
  }
92
+ },
93
+ "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
94
+ "type": "custom_openai",
95
+ "name": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
96
+ "max_requests_per_minute": 100,
97
+ "max_retries": 3,
98
+ "retry_base_delay": 5,
99
+ "custom_endpoint": {
100
+ "url": "https://api.together.xyz/v1",
101
+ "api_key": "$TOGETHER_API_KEY"
102
+ }
92
103
  }
93
- }
104
+ }
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "code-puppy"
7
- version = "0.0.35"
7
+ version = "0.0.37"
8
8
  description = "Code generation agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes