agentic-python-coder 3.0.0__tar.gz → 3.1.0__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.
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/PKG-INFO +8 -7
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/README.md +4 -3
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/llm.py +14 -10
- agentic_python_coder-3.1.0/coder/src/agentic_python_coder/models/gemini3flash.json +5 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/pyproject.toml +4 -4
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/.gitignore +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/LICENSE +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/.gitignore +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/prompts/system.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/prompts/system_todo.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/__init__.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/agent.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/cli.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/__init__.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/clingo/README.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/clingo/clingo.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/clingo/sample_tasks/bird_reasoning.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/clingo/sample_tasks/diagnosis.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/clingo/sample_tasks/simple_coloring.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/clingo/sample_tasks/stable_marriage.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/clingo/sample_tasks/sudoku_mini.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/cpmpy/README.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/cpmpy/cpmpy.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/cpmpy/sample_tasks/magic_square.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/cpmpy/sample_tasks/n_queens.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/regex/README.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/regex/regex.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/regex/sample_tasks/email_extraction.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/regex/sample_tasks/phone_validation.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/examples/regex/sample_tasks/url_parsing.md +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/kernel.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/mcp_server.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/deepseek31.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/gemini25.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/gemini3pro.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/gpt52.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/grok41.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/opus45.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/qwen3.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/models/sonnet45.json +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/project_md.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/runner.py +0 -0
- {agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/tools.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentic-python-coder
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: A lightweight Python coding agent that writes, executes, and iterates on code through natural language instructions
|
|
5
5
|
Author: Stefan Szeider
|
|
6
6
|
License: Apache-2.0
|
|
@@ -14,13 +14,13 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
15
|
Classifier: Topic :: Software Development :: Code Generators
|
|
16
16
|
Requires-Python: <3.14,>=3.13
|
|
17
|
-
Requires-Dist: ipykernel>=7.
|
|
17
|
+
Requires-Dist: ipykernel>=7.2.0
|
|
18
18
|
Requires-Dist: jupyter-client>=8.8.0
|
|
19
19
|
Requires-Dist: mcp>=1.26.0
|
|
20
|
-
Requires-Dist: openai>=2.
|
|
20
|
+
Requires-Dist: openai>=2.21.0
|
|
21
21
|
Requires-Dist: python-dotenv>=1.2.1
|
|
22
22
|
Requires-Dist: pyyaml>=6.0.3
|
|
23
|
-
Requires-Dist: rich>=14.3.
|
|
23
|
+
Requires-Dist: rich>=14.3.2
|
|
24
24
|
Provides-Extra: dev
|
|
25
25
|
Requires-Dist: mypy>=1.19.1; extra == 'dev'
|
|
26
26
|
Requires-Dist: ruff>=0.14.14; extra == 'dev'
|
|
@@ -152,8 +152,9 @@ coder --model deepseek31 "task" # DeepSeek v3.1
|
|
|
152
152
|
coder --model grok41 "task" # X.AI Grok 4.1
|
|
153
153
|
coder --model qwen3 "task" # Qwen3 Coder
|
|
154
154
|
coder --model gemini25 "task" # Gemini Pro 2.5
|
|
155
|
-
coder --model gemini3pro "task"
|
|
156
|
-
coder --model
|
|
155
|
+
coder --model gemini3pro "task" # Gemini 3 Pro Preview
|
|
156
|
+
coder --model gemini3flash "task" # Gemini 3 Flash Preview (fast, low-cost)
|
|
157
|
+
coder --model gpt52 "task" # GPT-5.2
|
|
157
158
|
|
|
158
159
|
# Custom model (JSON file)
|
|
159
160
|
coder --model ./mymodel.json "task"
|
|
@@ -259,7 +260,7 @@ from agentic_python_coder import get_openrouter_llm, list_available_models
|
|
|
259
260
|
|
|
260
261
|
llm = get_openrouter_llm(model="sonnet45")
|
|
261
262
|
print(list_available_models())
|
|
262
|
-
# ['deepseek31', 'gemini25', 'gemini3pro', 'gpt52', 'grok41', 'opus45', 'qwen3', 'sonnet45']
|
|
263
|
+
# ['deepseek31', 'gemini25', 'gemini3flash', 'gemini3pro', 'gpt52', 'grok41', 'opus45', 'qwen3', 'sonnet45']
|
|
263
264
|
```
|
|
264
265
|
|
|
265
266
|
---
|
|
@@ -119,8 +119,9 @@ coder --model deepseek31 "task" # DeepSeek v3.1
|
|
|
119
119
|
coder --model grok41 "task" # X.AI Grok 4.1
|
|
120
120
|
coder --model qwen3 "task" # Qwen3 Coder
|
|
121
121
|
coder --model gemini25 "task" # Gemini Pro 2.5
|
|
122
|
-
coder --model gemini3pro "task"
|
|
123
|
-
coder --model
|
|
122
|
+
coder --model gemini3pro "task" # Gemini 3 Pro Preview
|
|
123
|
+
coder --model gemini3flash "task" # Gemini 3 Flash Preview (fast, low-cost)
|
|
124
|
+
coder --model gpt52 "task" # GPT-5.2
|
|
124
125
|
|
|
125
126
|
# Custom model (JSON file)
|
|
126
127
|
coder --model ./mymodel.json "task"
|
|
@@ -226,7 +227,7 @@ from agentic_python_coder import get_openrouter_llm, list_available_models
|
|
|
226
227
|
|
|
227
228
|
llm = get_openrouter_llm(model="sonnet45")
|
|
228
229
|
print(list_available_models())
|
|
229
|
-
# ['deepseek31', 'gemini25', 'gemini3pro', 'gpt52', 'grok41', 'opus45', 'qwen3', 'sonnet45']
|
|
230
|
+
# ['deepseek31', 'gemini25', 'gemini3flash', 'gemini3pro', 'gpt52', 'grok41', 'opus45', 'qwen3', 'sonnet45']
|
|
230
231
|
```
|
|
231
232
|
|
|
232
233
|
---
|
{agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/llm.py
RENAMED
|
@@ -43,7 +43,7 @@ def get_api_key() -> str:
|
|
|
43
43
|
api_key = os.getenv("OPENROUTER_API_KEY")
|
|
44
44
|
|
|
45
45
|
if not api_key:
|
|
46
|
-
print("
|
|
46
|
+
print("Error: No API key found. Set up with:", file=sys.stderr)
|
|
47
47
|
print(" mkdir -p ~/.config/coder", file=sys.stderr)
|
|
48
48
|
print(
|
|
49
49
|
" echo 'OPENROUTER_API_KEY=sk-or-...' > ~/.config/coder/.env",
|
|
@@ -62,6 +62,8 @@ def _load_json_file(path: Path, model: str) -> dict[str, Any]:
|
|
|
62
62
|
config = json.load(f)
|
|
63
63
|
except json.JSONDecodeError as e:
|
|
64
64
|
raise ValueError(f"Invalid JSON in model config '{model}': {e}") from e
|
|
65
|
+
except OSError as e:
|
|
66
|
+
raise FileNotFoundError(f"Cannot read model config '{model}': {e}") from e
|
|
65
67
|
|
|
66
68
|
if "path" not in config:
|
|
67
69
|
raise ValueError(f"Model config '{model}' missing required key: 'path'")
|
|
@@ -95,7 +97,7 @@ def load_model_config(model: str) -> dict[str, Any]:
|
|
|
95
97
|
return _load_json_file(path, model)
|
|
96
98
|
|
|
97
99
|
# Local override: ./{model}.json
|
|
98
|
-
local_path = Path(f"
|
|
100
|
+
local_path = Path(f"{model}.json")
|
|
99
101
|
if local_path.exists():
|
|
100
102
|
return _load_json_file(local_path, model)
|
|
101
103
|
|
|
@@ -107,9 +109,8 @@ def load_model_config(model: str) -> dict[str, Any]:
|
|
|
107
109
|
|
|
108
110
|
# List available models for error message
|
|
109
111
|
available = list_available_models()
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
)
|
|
112
|
+
suffix = f" Available: {', '.join(available)}" if available else ""
|
|
113
|
+
raise FileNotFoundError(f"Model '{model}' not found.{suffix}")
|
|
113
114
|
|
|
114
115
|
|
|
115
116
|
def list_available_models() -> list[str]:
|
|
@@ -146,10 +147,10 @@ def get_openrouter_llm(
|
|
|
146
147
|
"""
|
|
147
148
|
# Load config from JSON
|
|
148
149
|
config = load_model_config(model)
|
|
149
|
-
|
|
150
|
+
model_id = config["path"]
|
|
150
151
|
|
|
151
152
|
if verbose:
|
|
152
|
-
print(f"Using model: {
|
|
153
|
+
print(f"Using model: {model_id}")
|
|
153
154
|
if os.getenv("CODER_VERBOSE"):
|
|
154
155
|
for key, value in config.items():
|
|
155
156
|
if key != "path":
|
|
@@ -194,7 +195,10 @@ def get_openrouter_llm(
|
|
|
194
195
|
if key in config:
|
|
195
196
|
api_params[key] = config[key]
|
|
196
197
|
if "top_k" in config:
|
|
197
|
-
|
|
198
|
-
api_params["extra_body"] = {"top_k": config["top_k"]}
|
|
198
|
+
api_params.setdefault("extra_body", {})["top_k"] = config["top_k"]
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
# Provider routing works for all models (including no_sampling_params)
|
|
201
|
+
if "provider" in config:
|
|
202
|
+
api_params.setdefault("extra_body", {})["provider"] = config["provider"]
|
|
203
|
+
|
|
204
|
+
return LLMConfig(client=client, model=model_id, api_params=api_params)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "agentic-python-coder"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.1.0"
|
|
4
4
|
description = "A lightweight Python coding agent that writes, executes, and iterates on code through natural language instructions"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13,<3.14"
|
|
@@ -19,11 +19,11 @@ classifiers = [
|
|
|
19
19
|
]
|
|
20
20
|
keywords = ["ai", "coding", "agent", "llm", "code-generation", "automation"]
|
|
21
21
|
dependencies = [
|
|
22
|
-
"openai>=2.
|
|
22
|
+
"openai>=2.21.0",
|
|
23
23
|
"python-dotenv>=1.2.1",
|
|
24
|
-
"rich>=14.3.
|
|
24
|
+
"rich>=14.3.2",
|
|
25
25
|
"jupyter-client>=8.8.0",
|
|
26
|
-
"ipykernel>=7.
|
|
26
|
+
"ipykernel>=7.2.0",
|
|
27
27
|
"PyYAML>=6.0.3",
|
|
28
28
|
"mcp>=1.26.0",
|
|
29
29
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/__init__.py
RENAMED
|
File without changes
|
{agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/agent.py
RENAMED
|
File without changes
|
{agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/cli.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/kernel.py
RENAMED
|
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
|
{agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/runner.py
RENAMED
|
File without changes
|
{agentic_python_coder-3.0.0 → agentic_python_coder-3.1.0}/coder/src/agentic_python_coder/tools.py
RENAMED
|
File without changes
|