Skip to content

Commit 7742c60

Browse files
feat(api): api update
1 parent 230659a commit 7742c60

12 files changed

+178
-2
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 70
2-
openapi_spec_hash: 11279400677011ad5dc1ebba33216ae4
2+
openapi_spec_hash: 97ec07f3ab237f61ed0bbc359486cc0e
33
config_hash: aad16f20fed13ac50211fc1d0e2ea621

src/codex/resources/projects/query_logs.py

Lines changed: 60 additions & 0 deletions
Large diffs are not rendered by default.

src/codex/types/project_retrieve_response.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Dict, Optional
3+
from typing import Dict, List, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

@@ -9,6 +9,7 @@
99
__all__ = [
1010
"ProjectRetrieveResponse",
1111
"Config",
12+
"ConfigDeterministicEval",
1213
"ConfigEvalConfig",
1314
"ConfigEvalConfigCustomEvals",
1415
"ConfigEvalConfigCustomEvalsEvals",
@@ -27,6 +28,14 @@
2728
]
2829

2930

31+
class ConfigDeterministicEval(BaseModel):
32+
id: str
33+
34+
name: str
35+
36+
should_guardrail: bool
37+
38+
3039
class ConfigEvalConfigCustomEvalsEvalsGuardrailedFallback(BaseModel):
3140
message: str
3241
"""
@@ -469,6 +478,8 @@ class ConfigEvalConfig(BaseModel):
469478

470479

471480
class Config(BaseModel):
481+
deterministic_evals: List[ConfigDeterministicEval]
482+
472483
ai_guidance_threshold: Optional[float] = None
473484

474485
clustering_use_llm_matching: Optional[bool] = None

src/codex/types/projects/query_log_list_by_group_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ class QueryLogListByGroupParams(TypedDict, total=False):
3939
needs_review: Optional[bool]
4040
"""Filter logs that need review"""
4141

42+
non_triggered_deterministic_guardrail_ids: Optional[SequenceNotStr[str]]
43+
"""
44+
Filter logs where ANY of these deterministic guardrail IDs were checked but not
45+
triggered (OR operation)
46+
"""
47+
4248
offset: int
4349

4450
order: Literal["asc", "desc"]
@@ -76,5 +82,11 @@ class QueryLogListByGroupParams(TypedDict, total=False):
7682
tool_call_names: Optional[SequenceNotStr[str]]
7783
"""Filter by names of tools called in the assistant response"""
7884

85+
triggered_deterministic_guardrail_ids: Optional[SequenceNotStr[str]]
86+
"""
87+
Filter logs where ANY of these deterministic guardrail IDs were triggered (OR
88+
operation)
89+
"""
90+
7991
was_cache_hit: Optional[bool]
8092
"""Filter by cache hit status"""

src/codex/types/projects/query_log_list_by_group_response.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,12 @@ class QueryLogsByGroupQueryLog(BaseModel):
504504
itself.
505505
"""
506506

507+
non_triggered_deterministic_guardrail_ids: Optional[List[str]] = None
508+
"""
509+
UUIDs of deterministic guardrails that were checked but not triggered for this
510+
query
511+
"""
512+
507513
original_assistant_response: Optional[str] = None
508514
"""The original assistant response that would have been displayed to the user.
509515
@@ -538,6 +544,9 @@ class QueryLogsByGroupQueryLog(BaseModel):
538544
If not provided, it is assumed no tools were provided to the LLM.
539545
"""
540546

547+
triggered_deterministic_guardrail_ids: Optional[List[str]] = None
548+
"""UUIDs of deterministic guardrails that were triggered for this query"""
549+
541550

542551
class QueryLogsByGroup(BaseModel):
543552
query_logs: List[QueryLogsByGroupQueryLog]
@@ -572,6 +581,12 @@ class Filters(BaseModel):
572581
needs_review: Optional[bool] = None
573582
"""Filter logs that need review"""
574583

584+
non_triggered_deterministic_guardrail_ids: Optional[List[str]] = None
585+
"""
586+
Filter logs where ANY of these deterministic guardrail IDs were checked but not
587+
triggered (OR operation)
588+
"""
589+
575590
passed_evals: Optional[List[str]] = None
576591
"""Filter by evals that passed"""
577592

@@ -589,6 +604,12 @@ class Filters(BaseModel):
589604
tool_call_names: Optional[List[str]] = None
590605
"""Filter by names of tools called in the assistant response"""
591606

607+
triggered_deterministic_guardrail_ids: Optional[List[str]] = None
608+
"""
609+
Filter logs where ANY of these deterministic guardrail IDs were triggered (OR
610+
operation)
611+
"""
612+
592613
was_cache_hit: Optional[bool] = None
593614
"""Filter by cache hit status"""
594615

src/codex/types/projects/query_log_list_groups_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ class QueryLogListGroupsParams(TypedDict, total=False):
3939
needs_review: Optional[bool]
4040
"""Filter log groups that need review"""
4141

42+
non_triggered_deterministic_guardrail_ids: Optional[SequenceNotStr[str]]
43+
"""
44+
Filter logs where ANY of these deterministic guardrail IDs were checked but not
45+
triggered (OR operation)
46+
"""
47+
4248
offset: int
4349

4450
order: Literal["asc", "desc"]
@@ -74,5 +80,11 @@ class QueryLogListGroupsParams(TypedDict, total=False):
7480
tool_call_names: Optional[SequenceNotStr[str]]
7581
"""Filter by names of tools called in the assistant response"""
7682

83+
triggered_deterministic_guardrail_ids: Optional[SequenceNotStr[str]]
84+
"""
85+
Filter logs where ANY of these deterministic guardrail IDs were triggered (OR
86+
operation)
87+
"""
88+
7789
was_cache_hit: Optional[bool]
7890
"""Filter by cache hit status"""

src/codex/types/projects/query_log_list_groups_response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,12 @@ class QueryLogListGroupsResponse(BaseModel):
499499
itself.
500500
"""
501501

502+
non_triggered_deterministic_guardrail_ids: Optional[List[str]] = None
503+
"""
504+
UUIDs of deterministic guardrails that were checked but not triggered for this
505+
query
506+
"""
507+
502508
original_assistant_response: Optional[str] = None
503509
"""The original assistant response that would have been displayed to the user.
504510
@@ -532,3 +538,6 @@ class QueryLogListGroupsResponse(BaseModel):
532538
533539
If not provided, it is assumed no tools were provided to the LLM.
534540
"""
541+
542+
triggered_deterministic_guardrail_ids: Optional[List[str]] = None
543+
"""UUIDs of deterministic guardrails that were triggered for this query"""

src/codex/types/projects/query_log_list_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ class QueryLogListParams(TypedDict, total=False):
3636

3737
limit: int
3838

39+
non_triggered_deterministic_guardrail_ids: Optional[SequenceNotStr[str]]
40+
"""
41+
Filter logs where ANY of these deterministic guardrail IDs were checked but not
42+
triggered (OR operation)
43+
"""
44+
3945
offset: int
4046

4147
order: Literal["asc", "desc"]
@@ -70,5 +76,11 @@ class QueryLogListParams(TypedDict, total=False):
7076
tool_call_names: Optional[SequenceNotStr[str]]
7177
"""Filter by names of tools called in the assistant response"""
7278

79+
triggered_deterministic_guardrail_ids: Optional[SequenceNotStr[str]]
80+
"""
81+
Filter logs where ANY of these deterministic guardrail IDs were triggered (OR
82+
operation)
83+
"""
84+
7385
was_cache_hit: Optional[bool]
7486
"""Filter by cache hit status"""

src/codex/types/projects/query_log_list_response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,12 @@ class QueryLogListResponse(BaseModel):
484484
itself.
485485
"""
486486

487+
non_triggered_deterministic_guardrail_ids: Optional[List[str]] = None
488+
"""
489+
UUIDs of deterministic guardrails that were checked but not triggered for this
490+
query
491+
"""
492+
487493
original_assistant_response: Optional[str] = None
488494
"""The original assistant response that would have been displayed to the user.
489495
@@ -517,3 +523,6 @@ class QueryLogListResponse(BaseModel):
517523
518524
If not provided, it is assumed no tools were provided to the LLM.
519525
"""
526+
527+
triggered_deterministic_guardrail_ids: Optional[List[str]] = None
528+
"""UUIDs of deterministic guardrails that were triggered for this query"""

src/codex/types/projects/query_log_retrieve_response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,12 @@ class QueryLogRetrieveResponse(BaseModel):
498498
itself.
499499
"""
500500

501+
non_triggered_deterministic_guardrail_ids: Optional[List[str]] = None
502+
"""
503+
UUIDs of deterministic guardrails that were checked but not triggered for this
504+
query
505+
"""
506+
501507
original_assistant_response: Optional[str] = None
502508
"""The original assistant response that would have been displayed to the user.
503509
@@ -531,3 +537,6 @@ class QueryLogRetrieveResponse(BaseModel):
531537
532538
If not provided, it is assumed no tools were provided to the LLM.
533539
"""
540+
541+
triggered_deterministic_guardrail_ids: Optional[List[str]] = None
542+
"""UUIDs of deterministic guardrails that were triggered for this query"""

0 commit comments

Comments
 (0)