aient 1.1.21__py3-none-any.whl → 1.1.22__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
@@ -352,7 +352,15 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
352
352
  stream=gemini_stream
353
353
  )
354
354
  elif api_key is not None and api_key[2] == ".":
355
- url = f"https://aiplatform.googleapis.com/v1/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
355
+ if provider.get("project_id") and "gemini-2.5-pro-preview-06-05" == original_model:
356
+ if isinstance(provider.get("project_id"), list):
357
+ api_key_index = provider.get("api").index(api_key)
358
+ project_id = provider.get("project_id")[api_key_index]
359
+ else:
360
+ project_id = provider.get("project_id")
361
+ url = f"https://aiplatform.googleapis.com/v1/projects/{project_id}/locations/global/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
362
+ else:
363
+ url = f"https://aiplatform.googleapis.com/v1/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
356
364
  headers.pop("Authorization", None)
357
365
  elif "gemini-2.5-pro-exp-03-25" == original_model:
358
366
  url = "https://aiplatform.googleapis.com/v1/projects/{PROJECT_ID}/locations/{LOCATION}/publishers/google/models/{MODEL_ID}:{stream}".format(
@@ -426,7 +434,8 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
426
434
  messages.append({"role": msg.role, "parts": content})
427
435
  elif msg.role == "system":
428
436
  system_prompt = system_prompt + "\n\n" + content[0]["text"]
429
- systemInstruction = {"parts": [{"text": system_prompt}]}
437
+ if system_prompt.strip():
438
+ systemInstruction = {"parts": [{"text": system_prompt}]}
430
439
 
431
440
  if any(off_model in original_model for off_model in gemini_max_token_65k_models):
432
441
  safety_settings = "OFF"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.1.21
3
+ Version: 1.1.22
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=g6rUcNwSTHwmBzt1epsu_2Re8YRFKVCSXRUIFJZpAb4,7432
7
- aient/core/request.py,sha256=qKj_w9UpXZePCGhhMuE-rX7rCPUdCx8GJ-HUXiurBho,66589
7
+ aient/core/request.py,sha256=1t11Ep_MxVtmdkFm-vGNSFWFHgbM2DDemVZSrujT8Pc,67175
8
8
  aient/core/response.py,sha256=YphzhA9jtQKzWb3L4XGTp9xJZ2FOzHr1aAMTsi896FQ,33201
9
9
  aient/core/utils.py,sha256=zidsBUBd3KskzcxQcPB1y5x1RhtWcbZeWvmgb4LAadA,27318
10
10
  aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
@@ -38,8 +38,8 @@ aient/prompt/agent.py,sha256=ZNsbgXRyvYzAFTRRziAnNVqcTyAnxrGcsGfGrt72j6k,25427
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.21.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
- aient-1.1.21.dist-info/METADATA,sha256=3Rzf90m825Zde0m1eUa7LP7P7Zfx5MK4LgixfbYcJos,4968
43
- aient-1.1.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
- aient-1.1.21.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
- aient-1.1.21.dist-info/RECORD,,
41
+ aient-1.1.22.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
+ aient-1.1.22.dist-info/METADATA,sha256=sFiobRMyPCjvaMyWZk4GCwe2_KFCzHSLNKEeJ75HSUI,4968
43
+ aient-1.1.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
+ aient-1.1.22.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
+ aient-1.1.22.dist-info/RECORD,,
File without changes