mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test(integration): sort imports after moving the Claude Code fixture into _support
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
77e3b8552a
commit
ad6ec3faa6
14 changed files with 31 additions and 25 deletions
|
|
@ -141,7 +141,9 @@ def tools() -> tuple[dict[str, JsonValue], ...]:
|
|||
{
|
||||
"file_path": field("The absolute path to the file to modify", type="string"),
|
||||
"old_string": field("The text to replace", type="string"),
|
||||
"new_string": field("The text to replace it with (must be different from old_string)", type="string"),
|
||||
"new_string": field(
|
||||
"The text to replace it with (must be different from old_string)", type="string"
|
||||
),
|
||||
"replace_all": field(
|
||||
"Replace all occurrences of old_string (default false)",
|
||||
default=False,
|
||||
|
|
@ -456,8 +458,12 @@ def tools() -> tuple[dict[str, JsonValue], ...]:
|
|||
"input_schema": schema(
|
||||
{
|
||||
"query": field("The search query to use", type="string", minLength=2),
|
||||
"allowed_domains": field("Only include search results from these domains", type="array", items={"type": "string"}),
|
||||
"blocked_domains": field("Never include search results from these domains", type="array", items={"type": "string"}),
|
||||
"allowed_domains": field(
|
||||
"Only include search results from these domains", type="array", items={"type": "string"}
|
||||
),
|
||||
"blocked_domains": field(
|
||||
"Never include search results from these domains", type="array", items={"type": "string"}
|
||||
),
|
||||
},
|
||||
("query",),
|
||||
),
|
||||
|
|
@ -470,8 +476,12 @@ def tools() -> tuple[dict[str, JsonValue], ...]:
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"script": field("Self-contained workflow script.", type="string", maxLength=524288),
|
||||
"name": field("Name of a predefined workflow (built-in or from .claude/workflows/).", type="string"),
|
||||
"description": field("Ignored — set the workflow description in the script's `meta` block.", type="string"),
|
||||
"name": field(
|
||||
"Name of a predefined workflow (built-in or from .claude/workflows/).", type="string"
|
||||
),
|
||||
"description": field(
|
||||
"Ignored — set the workflow description in the script's `meta` block.", type="string"
|
||||
),
|
||||
"title": field("Ignored — set the workflow title in the script's `meta` block.", type="string"),
|
||||
"args": field("Optional input value exposed to the script as the global `args`, verbatim."),
|
||||
"scriptPath": field("Path to a workflow script file on disk.", type="string"),
|
||||
|
|
@ -489,7 +499,9 @@ def tools() -> tuple[dict[str, JsonValue], ...]:
|
|||
"description": "Writes a file to the local filesystem.",
|
||||
"input_schema": schema(
|
||||
{
|
||||
"file_path": field("The absolute path to the file to write (must be absolute, not relative)", type="string"),
|
||||
"file_path": field(
|
||||
"The absolute path to the file to write (must be absolute, not relative)", type="string"
|
||||
),
|
||||
"content": field("The content to write to the file", type="string"),
|
||||
},
|
||||
("file_path", "content"),
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import uuid
|
|||
from typing import Final
|
||||
|
||||
import pytest
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
_CONTEXT_MANAGEMENT: Final = {
|
||||
"edits": [
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@ import base64
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
_PDF_BYTES: Final = (
|
||||
b"%PDF-1.1\n"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
_PNG_B64: Final = "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAEElEQVR4nGP4z8AARwzEcQCukw/x0F8jngAAAABJRU5ErkJggg=="
|
||||
_IMAGE_BLOCK: Final = {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
_TURN1_TOOL: Final = ("toolu_a", "Read", {"file_path": "/tmp/cc_probe/a.txt"})
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import uuid
|
|||
from typing import Final
|
||||
|
||||
import pytest
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
|
||||
_BETA_1M: Final = f"{cc.FRONTIER_CLI_BETA.replace(',effort-2025-11-24', ',context-1m-2025-08-07,effort-2025-11-24')}"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
|
||||
def test_mid_loop_model_switch_replays_history_byte_identical(gateway: Gateway) -> None:
|
||||
|
|
|
|||
|
|
@ -2,11 +2,10 @@ import uuid
|
|||
from typing import Final
|
||||
|
||||
import pytest
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
_USAGE: Final = {
|
||||
"input_tokens": 10,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
|
||||
_MODEL: Final = cc.SONNET
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
from pydantic import JsonValue
|
||||
|
||||
_THINKING: Final = "need to read the file"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
|
||||
WEB_SEARCH_TOOL: Final = {"type": "web_search_20250305", "name": "web_search", "max_uses": 8}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@ import uuid
|
|||
from pathlib import Path
|
||||
from typing import Final
|
||||
|
||||
import pytest
|
||||
import yaml
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.process import owned_proxy
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
|
||||
|
||||
def _error_529() -> Reply:
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import uuid
|
||||
from typing import Final
|
||||
|
||||
from integration._support import claude_code as cc
|
||||
from integration._support.client import Gateway, eventually
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.wire import Reply, Request, wire_server
|
||||
from integration._support import claude_code as cc
|
||||
|
||||
|
||||
def test_client_disconnect_mid_stream_still_bills_the_message(gateway: Gateway) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue