alpiecode 0.7.1__tar.gz → 0.7.2__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 (22) hide show
  1. {alpiecode-0.7.1 → alpiecode-0.7.2}/PKG-INFO +1 -1
  2. {alpiecode-0.7.1 → alpiecode-0.7.2}/pyproject.toml +1 -1
  3. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/alpiecode.egg-info/PKG-INFO +1 -1
  4. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/local_model.py +10 -2
  5. {alpiecode-0.7.1 → alpiecode-0.7.2}/README.md +0 -0
  6. {alpiecode-0.7.1 → alpiecode-0.7.2}/setup.cfg +0 -0
  7. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/alpiecode.egg-info/SOURCES.txt +0 -0
  8. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/alpiecode.egg-info/dependency_links.txt +0 -0
  9. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/alpiecode.egg-info/entry_points.txt +0 -0
  10. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/alpiecode.egg-info/requires.txt +0 -0
  11. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/alpiecode.egg-info/top_level.txt +0 -0
  12. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/__init__.py +0 -0
  13. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/agent.py +0 -0
  14. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/cli.py +0 -0
  15. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/compaction.py +0 -0
  16. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/config.py +0 -0
  17. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/github.py +0 -0
  18. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/guardian.py +0 -0
  19. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/media.py +0 -0
  20. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/memory.py +0 -0
  21. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/tools.py +0 -0
  22. {alpiecode-0.7.1 → alpiecode-0.7.2}/src/codeagent/updater.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: AlpieCode — Autonomous AI Coding Agent CLI powered by local 169Pi GGUF VLM
5
5
  Requires-Python: >=3.9
6
6
  Requires-Dist: huggingface_hub>=0.20.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "alpiecode"
7
- version = "0.7.1"
7
+ version = "0.7.2"
8
8
  description = "AlpieCode — Autonomous AI Coding Agent CLI powered by local 169Pi GGUF VLM"
9
9
  requires-python = ">=3.9"
10
10
  dependencies = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: AlpieCode — Autonomous AI Coding Agent CLI powered by local 169Pi GGUF VLM
5
5
  Requires-Python: >=3.9
6
6
  Requires-Dist: huggingface_hub>=0.20.0
@@ -7,6 +7,7 @@ Provides an OpenAI-compatible `create_chat_completion` interface.
7
7
  """
8
8
 
9
9
  import os
10
+ import re
10
11
  import sys
11
12
  from pathlib import Path
12
13
  from typing import Any, Dict, List, Optional
@@ -395,8 +396,6 @@ class LocalModel:
395
396
 
396
397
  enable_thinking = kwargs.get("enable_thinking", True)
397
398
 
398
- # When thinking is disabled, inject assistant prefill to skip reasoning tokens
399
- # This eliminates ~6s of thinking token generation per turn
400
399
  if not enable_thinking:
401
400
  msgs = list(messages) + [{"role": "assistant", "content": "<think>\n\n</think>\n\n"}]
402
401
  else:
@@ -412,6 +411,15 @@ class LocalModel:
412
411
  params["tool_choice"] = kwargs.get("tool_choice", "auto")
413
412
 
414
413
  result_dict = llm.create_chat_completion(**params)
414
+
415
+ # Fix prefill response content so chat history remains valid across multi-turn sessions
416
+ if not enable_thinking and result_dict.get("choices"):
417
+ msg_dict = result_dict["choices"][0].get("message", {})
418
+ raw_content = msg_dict.get("content") or ""
419
+ # Strip redundant opening/closing think tags output by model after prefill
420
+ cleaned = re.sub(r"^\s*(?:</think>|<think>)*\s*", "", raw_content)
421
+ msg_dict["content"] = f"<think>\n\n</think>\n\n{cleaned}"
422
+
415
423
  return _DictWrapper(result_dict)
416
424
 
417
425
 
File without changes
File without changes