aient 1.1.14__py3-none-any.whl → 1.1.15__py3-none-any.whl

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.
aient/core/request.py CHANGED
@@ -1510,9 +1510,10 @@ async def get_claude_payload(request, engine, provider, api_key=None):
1510
1510
  payload = {
1511
1511
  "model": original_model,
1512
1512
  "messages": messages,
1513
- "system": system_prompt or "You are Claude, a large language model trained by Anthropic.",
1514
1513
  "max_tokens": max_tokens,
1515
1514
  }
1515
+ if system_prompt:
1516
+ payload["system"] = system_prompt
1516
1517
 
1517
1518
  if request.max_tokens:
1518
1519
  payload["max_tokens"] = int(request.max_tokens)
@@ -1560,7 +1561,7 @@ async def get_claude_payload(request, engine, provider, api_key=None):
1560
1561
  payload.pop("tools", None)
1561
1562
  payload.pop("tool_choice", None)
1562
1563
 
1563
- if "think" in request.model:
1564
+ if "think" in request.model.lower():
1564
1565
  payload["thinking"] = {
1565
1566
  "budget_tokens": 4096,
1566
1567
  "type": "enabled"
@@ -1586,6 +1587,14 @@ async def get_claude_payload(request, engine, provider, api_key=None):
1586
1587
  payload.pop("top_k", None)
1587
1588
  # print("payload", json.dumps(payload, indent=2, ensure_ascii=False))
1588
1589
 
1590
+ if safe_get(provider, "preferences", "post_body_parameter_overrides", default=None):
1591
+ for key, value in safe_get(provider, "preferences", "post_body_parameter_overrides", default={}).items():
1592
+ if key == request.model:
1593
+ for k, v in value.items():
1594
+ payload[k] = v
1595
+ elif all(_model not in request.model.lower() for _model in ["gemini", "gpt", "claude"]):
1596
+ payload[key] = value
1597
+
1589
1598
  return url, headers, payload
1590
1599
 
1591
1600
  async def get_dalle_payload(request, engine, provider, api_key=None):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.1.14
3
+ Version: 1.1.15
4
4
  Summary: Aient: The Awakening of Agent.
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -4,7 +4,7 @@ aient/core/.gitignore,sha256=5JRRlYYsqt_yt6iFvvzhbqh2FTUQMqwo6WwIuFzlGR8,13
4
4
  aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
5
5
  aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
6
6
  aient/core/models.py,sha256=kF-HLi1I2k_G5r153ZHuiGH8_NmpTlFMfK0_myB28YQ,7366
7
- aient/core/request.py,sha256=9GbzEg7jIH8s-jXeB1gsfoOsDbwg4C6LqXvRxVTnqEs,65263
7
+ aient/core/request.py,sha256=2u_vPJjoIqRsKOPOkPilGzM4iZXUpsx5xtouQy87Z4E,65693
8
8
  aient/core/response.py,sha256=Z0Bjl_QvpUguyky1LIcsVks4BKKqT0eYEpDmKa_cwpQ,31978
9
9
  aient/core/utils.py,sha256=-naFCv8V-qhnqvDUd8BNbW1HR9CVAPxISrXoAz464Qg,26580
10
10
  aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
@@ -38,8 +38,8 @@ aient/prompt/agent.py,sha256=y2GETN6ScC5yQVs75VFfzm4YUWzblbqLYz0Sy6JnPRw,24950
38
38
  aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
40
40
  aient/utils/scripts.py,sha256=LD8adnfuRrJoY2tWKseXOPJXaxbrUmz4czsnUvHswNY,29096
41
- aient-1.1.14.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
- aient-1.1.14.dist-info/METADATA,sha256=Cm2dAAwtu6XxjyHCXOgzNRRRdbQAC2iVeCFfJxLM3Wg,4968
43
- aient-1.1.14.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
44
- aient-1.1.14.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
- aient-1.1.14.dist-info/RECORD,,
41
+ aient-1.1.15.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
+ aient-1.1.15.dist-info/METADATA,sha256=MTwSePn_DF0VVK3i0k9yW8E6Y2dOEn76NwsF7BGx_E0,4968
43
+ aient-1.1.15.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
44
+ aient-1.1.15.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
+ aient-1.1.15.dist-info/RECORD,,
File without changes