verifiers 0.2.1.dev10__py3-none-any.whl → 0.2.1.dev12__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.
@@ -30,6 +30,16 @@ from verifiers.v1.types import (
30
30
  content_to_parts,
31
31
  )
32
32
 
33
+
34
+ class ModdedChatCompletion(ChatCompletion):
35
+ """The OpenAI SDK closes `service_tier` to a fixed `Literal`, but providers return tiers
36
+ outside it (e.g. Prime's `provisioned`), which makes `model_validate` reject an otherwise
37
+ valid completion. Widen the field to a plain string — we don't consume it — so parsing stays
38
+ lenient about the label instead of dropping it."""
39
+
40
+ service_tier: str | None = None
41
+
42
+
33
43
  FINISH_REASONS = frozenset({"stop", "length", "tool_calls"})
34
44
 
35
45
  # Providers name the model's reasoning differently; read them in the v0 client's precedence.
@@ -262,7 +272,7 @@ class ChatStreamParser(StreamParser):
262
272
  self.message["reasoning_details"] = self.reasoning_details
263
273
  head = self.head or {}
264
274
  return response_from_wire(
265
- ChatCompletion.model_validate(
275
+ ModdedChatCompletion.model_validate(
266
276
  {
267
277
  "id": head.get("id", "vf-intercept"),
268
278
  "object": "chat.completion",
@@ -284,7 +294,7 @@ class ChatStreamParser(StreamParser):
284
294
  class ChatDialect(Dialect[dict, ChatCompletion]):
285
295
  routes = ("/v1/chat/completions",)
286
296
  upstream_path = "/chat/completions"
287
- response_type = ChatCompletion
297
+ response_type = ModdedChatCompletion
288
298
 
289
299
  def parse_request(self, body: dict) -> tuple[Messages, list[Tool] | None]:
290
300
  messages: Messages = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: verifiers
3
- Version: 0.2.1.dev10
3
+ Version: 0.2.1.dev12
4
4
  Summary: Verifiers: Environments for LLM Reinforcement Learning
5
5
  Project-URL: Homepage, https://github.com/primeintellect-ai/verifiers
6
6
  Project-URL: Documentation, https://github.com/primeintellect-ai/verifiers
@@ -249,7 +249,7 @@ verifiers/v1/configs/validate.py,sha256=MgHw9qiFfIfrdPt1FNc3spum8a4wtzRmOW4VoogM
249
249
  verifiers/v1/dialects/__init__.py,sha256=gu1_ROKhMnTbhGiyUxckX2XHuhwVucRXlNK0ul9XnWY,862
250
250
  verifiers/v1/dialects/anthropic.py,sha256=_WxY3EcZAx_HO-tMFpBz4ylcU9El3CPylRfLnbKaf9A,12383
251
251
  verifiers/v1/dialects/base.py,sha256=SIir2dCzlhhmjgqZv-fuw6aAgOQ8-OwOecEEvLc8UV4,8680
252
- verifiers/v1/dialects/chat.py,sha256=JJK0MH2_xygH8jYS6MCqPZ0-yKqLgOXMGDZCYD9F4P4,13326
252
+ verifiers/v1/dialects/chat.py,sha256=TIIQv1nxnxBDJMyBJERJf5nE-9RA4PIID1Vajpp0uzw,13765
253
253
  verifiers/v1/dialects/responses.py,sha256=d6FFXpAjrjxlaUwYVkywNC5iQZPCZp-vlTrABowC0ko,14592
254
254
  verifiers/v1/gepa/__init__.py,sha256=rZsikZtKKDKm7eU8hnn8fJi7FHScsTQJXNtFw1f-pD4,534
255
255
  verifiers/v1/gepa/adapter.py,sha256=-OyQwbsF6eNoql5TJ_qGs32zcTuUA1w4zNDvY-UfE5s,5336
@@ -318,8 +318,8 @@ verifiers/v1/utils/interrupt.py,sha256=F-KKhc5ndPJJfhd3SuMqyqhXhA32FhCRy5KWFJpEo
318
318
  verifiers/v1/utils/logging.py,sha256=OcMHA6NsYux3oIzjPuI95rDWmFBHNcHDjZeNIhXTX-Y,2084
319
319
  verifiers/v1/utils/memory.py,sha256=ZkIvGk6uITAH5sKon65LifKPbvZr8mJ__PVc23FZpOQ,1835
320
320
  verifiers/v1/utils/sampling.py,sha256=pzCf5HSYl41KFfX90hVNREwRkGncmcJYQ2ndRfVekI0,1037
321
- verifiers-0.2.1.dev10.dist-info/METADATA,sha256=0Die7mpvs9jVznl7y0sDQNf5-l7Vl81Bx0-d3D3Tlww,5136
322
- verifiers-0.2.1.dev10.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
323
- verifiers-0.2.1.dev10.dist-info/entry_points.txt,sha256=dF82JUYEFslR1AOW8LZfuBWeZeQoyX4wCRrduklg8-I,551
324
- verifiers-0.2.1.dev10.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
325
- verifiers-0.2.1.dev10.dist-info/RECORD,,
321
+ verifiers-0.2.1.dev12.dist-info/METADATA,sha256=meLrrXexdZDBIzNDNURoqaNhNdC_w8G9qSxlgVu1jbM,5136
322
+ verifiers-0.2.1.dev12.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
323
+ verifiers-0.2.1.dev12.dist-info/entry_points.txt,sha256=dF82JUYEFslR1AOW8LZfuBWeZeQoyX4wCRrduklg8-I,551
324
+ verifiers-0.2.1.dev12.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
325
+ verifiers-0.2.1.dev12.dist-info/RECORD,,