Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions services/core/tests/official_admin_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import uuid
import zipfile

import httpx
import httpx2
import openai
from openai import DefaultHttpxClient, OpenAI

Expand Down Expand Up @@ -62,7 +62,7 @@ def main():
secret_values.append(settings["model_provider"]["api_key"])
owned, keys, clients, projects, revoked = set(), [], [], [], set()
session_id = None
with httpx.Client(trust_env=False, timeout=30) as http:
with httpx2.Client(trust_env=False, timeout=30) as http:
def request(method, path, expected=200, token=None, headers=None, **kwargs):
response = http.request(method, base + path, headers={
**(admin if token is None else {"Authorization": "Bearer " + token, "OpenAI-Beta": "agents=v1"}),
Expand Down Expand Up @@ -370,7 +370,7 @@ def wait_idle(client, sid, wanted_turns):
state = http.get(session_path, headers=admin).json()["status"]
if state == "in_progress":
failures.append("session_stop")
except (httpx.HTTPError, KeyError, ValueError, RuntimeError):
except (httpx2.HTTPError, KeyError, ValueError, RuntimeError):
failures.append("session_stop")
# Sessions must finish before deletion; never remove another run's assets.
priority = {kind: index for index, kind in enumerate(("session", "agent", "environment_template", "skill", "vault", "file"))}
Expand All @@ -379,7 +379,7 @@ def wait_idle(client, sid, wanted_turns):
response = http.delete(base + f"/core/v1/projects/{project_id}/{ADMIN_PATHS[kind]}/{resource}", headers=admin)
if response.status_code not in (200, 204, 404):
failures.append(kind)
except httpx.HTTPError:
except httpx2.HTTPError:
failures.append(kind)
for project in projects:
if project["archived_at"] is None:
Expand Down
4 changes: 2 additions & 2 deletions services/core/tests/official_skill_selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import secrets
import sys

import httpx
import httpx2
import openai
from openai import DefaultHttpxClient, OpenAI

Expand Down Expand Up @@ -46,7 +46,7 @@ def projection(response, selector, status):
assert parsed.skills[0].skill_id == skill_id
return parsed.id

with httpx.Client(timeout=20, trust_env=False) as http:
with httpx2.Client(timeout=20, trust_env=False) as http:
try:
uploaded = client.skills.with_raw_response.create(files=[("proof/SKILL.md", manifest, "text/markdown")])
skill_id = uploaded.parse().id
Expand Down
4 changes: 2 additions & 2 deletions services/core/tests/official_skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
import zipfile

import httpx
import httpx2
import openai
from openai import DefaultHttpxClient, OpenAI

Expand All @@ -34,7 +34,7 @@ def main():
marker = "confidential-skill-" + secrets.token_hex(20)
data, manifest = bundle(marker)
owned = []
with httpx.Client(timeout=20, trust_env=False) as http:
with httpx2.Client(timeout=20, trust_env=False) as http:
try:
raw = client.skills.with_raw_response.create(files=[("proof/SKILL.md", manifest, "text/markdown"), ("proof/scripts/proof.py", b"print('proof')", "text/plain")])
skill = raw.parse()
Expand Down