Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.
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
4 changes: 4 additions & 0 deletions notdiamond/llms/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class NDLLMProviders(Enum):
CLAUDE_SONNET_4_20250514 (NDLLMProvider): refers to 'claude-sonnet-4-20250514' model by Anthropic
CLAUDE_SONNET_4_5 (NDLLMProvider): refers to 'claude-sonnet-4-5' model by Anthropic
CLAUDE_SONNET_4_5_20250929 (NDLLMProvider): refers to 'claude-sonnet-4-5-20250929' model by Anthropic
CLAUDE_HAIKU_4_5 (NDLLMProvider): refers to 'claude-haiku-4-5' model by Anthropic
CLAUDE_HAIKU_4_5_20251001 (NDLLMProvider): refers to 'claude-haiku-4-5-20251001' model by Anthropic
CLAUDE_OPUS_4_0 (NDLLMProvider): refers to 'claude-opus-4-0' model by Anthropic
CLAUDE_OPUS_4_1 (NDLLMProvider): refers to 'claude-opus-4-1' model by Anthropic
CLAUDE_SONNET_4_0 (NDLLMProvider): refers to 'claude-sonnet-4-0' model by Anthropic
Expand Down Expand Up @@ -134,6 +136,8 @@ class NDLLMProviders(Enum):
CLAUDE_SONNET_4_20250514 = ("anthropic", "claude-sonnet-4-20250514")
CLAUDE_SONNET_4_5 = ("anthropic", "claude-sonnet-4-5")
CLAUDE_SONNET_4_5_20250929 = ("anthropic", "claude-sonnet-4-5-20250929")
CLAUDE_HAIKU_4_5 = ("anthropic", "claude-haiku-4-5")
CLAUDE_HAIKU_4_5_20251001 = ("anthropic", "claude-haiku-4-5-20251001")
CLAUDE_OPUS_4_0 = ("anthropic", "claude-opus-4-0")
CLAUDE_OPUS_4_1 = ("anthropic", "claude-opus-4-1")
CLAUDE_SONNET_4_0 = ("anthropic", "claude-sonnet-4-0")
Expand Down
8 changes: 8 additions & 0 deletions notdiamond/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
"claude-sonnet-4-20250514",
"claude-sonnet-4-5",
"claude-sonnet-4-5-20250929",
"claude-haiku-4-5",
"claude-haiku-4-5-20251001",
"claude-opus-4-0",
"claude-opus-4-1",
"claude-sonnet-4-0",
Expand All @@ -178,6 +180,8 @@
"claude-sonnet-4-20250514",
"claude-sonnet-4-5",
"claude-sonnet-4-5-20250929",
"claude-haiku-4-5",
"claude-haiku-4-5-20251001",
"claude-opus-4-0",
"claude-opus-4-1",
"claude-sonnet-4-0",
Expand All @@ -201,6 +205,8 @@
"claude-sonnet-4-20250514": "anthropic/claude-sonnet-4",
"claude-sonnet-4-5": "anthropic/claude-sonnet-4-5",
"claude-sonnet-4-5-20250929": "anthropic/claude-sonnet-4-5",
"claude-haiku-4-5": "anthropic/claude-haiku-4-5",
"claude-haiku-4-5-20251001": "anthropic/claude-haiku-4-5",
"claude-opus-4-0": "anthropic/claude-opus-4",
"claude-opus-4-1": "anthropic/claude-opus-4-1",
"claude-sonnet-4-0": "anthropic/claude-sonnet-4",
Expand All @@ -221,6 +227,8 @@
"claude-sonnet-4-20250514": {"input": 3.0, "output": 15.0},
"claude-sonnet-4-5": {"input": 3.0, "output": 15.0},
"claude-sonnet-4-5-20250929": {"input": 3.0, "output": 15.0},
"claude-haiku-4-5": {"input": 1.0, "output": 5.0},
"claude-haiku-4-5-20251001": {"input": 1.0, "output": 5.0},
"claude-opus-4-0": {"input": 15.0, "output": 75.0},
"claude-opus-4-1": {"input": 15.0, "output": 75.0},
"claude-sonnet-4-0": {"input": 3.0, "output": 15.0},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
interactions:
- request:
body: '{"messages": [{"role": "user", "content": "How much is 3 + 5?"}], "llm_providers":
[{"provider": "anthropic", "model": "claude-haiku-4-5", "is_custom": false,
"context_length": null, "input_price": null, "output_price": null, "latency":
null}], "metric": "accuracy", "max_model_depth": 1, "hash_content": true, "tools":
[{"type": "function", "function": {"name": "add_fct", "description": "Add two
numbers", "parameters": {"type": "object", "properties": {"a": {"type": "integer",
"description": "The first number"}, "b": {"type": "integer", "description":
"The second number"}}, "required": ["a", "b"]}}}]}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '607'
User-Agent:
- Python-SDK/0.4.6
content-type:
- application/json
method: POST
uri: https://staging-api.notdiamond.ai/v2/modelRouter/modelSelect
response:
body:
string: '{"providers":[{"provider":"anthropic","model":"claude-haiku-4-5"}],"session_id":"9b1fd830-46af-4d40-9721-a435b3563d42"}'
headers:
CF-RAY:
- 9922d1537e1bf3a9-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Tue, 21 Oct 2025 18:28:58 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
content-length:
- '119'
rndr-id:
- 9496ca26-7e0a-4223
vary:
- Accept-Encoding
x-render-origin-server:
- uvicorn
x-request-id:
- 9496ca26-7e0a-4223
status:
code: 200
message: OK
- request:
body: '{"max_tokens":200,"messages":[{"role":"user","content":"How much is 3 +
5?"}],"model":"claude-haiku-4-5","tools":[{"name":"add_fct","description":"Add
two numbers","input_schema":{"type":"object","properties":{"a":{"type":"integer","description":"The
first number"},"b":{"type":"integer","description":"The second number"}},"required":["a","b"]}}]}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate, zstd
anthropic-version:
- '2023-06-01'
connection:
- keep-alive
content-length:
- '348'
content-type:
- application/json
host:
- api.anthropic.com
user-agent:
- Anthropic/Python 0.49.0
x-api-key:
- REDACTED
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 0.49.0
x-stainless-read-timeout:
- '120.0'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.12
x-stainless-timeout:
- NOT_GIVEN
method: POST
uri: https://api.anthropic.com/v1/messages
response:
body:
string: '{"model":"claude-haiku-4-5-20251001","id":"msg_01GB5sj9VwhFkt3jJpSoGtA3","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01G8aqFJ7t4jw7uC3GYe2DBD","name":"add_fct","input":{"a":3,"b":5}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":594,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":72,"service_tier":"standard"}}'
headers:
CF-RAY:
- 9922d15cfb11a051-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Tue, 21 Oct 2025 18:29:00 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Robots-Tag:
- none
anthropic-organization-id:
- a2610b2c-742e-455d-9552-6abe105b2a44
anthropic-ratelimit-input-tokens-limit:
- '4000000'
anthropic-ratelimit-input-tokens-remaining:
- '4000000'
anthropic-ratelimit-input-tokens-reset:
- '2025-10-21T18:29:00Z'
anthropic-ratelimit-output-tokens-limit:
- '800000'
anthropic-ratelimit-output-tokens-remaining:
- '800000'
anthropic-ratelimit-output-tokens-reset:
- '2025-10-21T18:29:00Z'
anthropic-ratelimit-requests-limit:
- '4000'
anthropic-ratelimit-requests-remaining:
- '3999'
anthropic-ratelimit-requests-reset:
- '2025-10-21T18:28:59Z'
anthropic-ratelimit-tokens-limit:
- '4800000'
anthropic-ratelimit-tokens-remaining:
- '4800000'
anthropic-ratelimit-tokens-reset:
- '2025-10-21T18:29:00Z'
cf-cache-status:
- DYNAMIC
content-length:
- '477'
request-id:
- req_011CULpP6uopMpyFxSpH2Fu1
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
via:
- 1.1 google
x-envoy-upstream-service-time:
- '1589'
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
interactions:
- request:
body: '{"messages": [{"role": "user", "content": "How much is 3 + 5?"}], "llm_providers":
[{"provider": "anthropic", "model": "claude-haiku-4-5", "is_custom": false,
"context_length": null, "input_price": null, "output_price": null, "latency":
null}], "metric": "accuracy", "max_model_depth": 1, "hash_content": true, "tools":
[{"type": "function", "function": {"name": "add_fct", "description": "Adds a
and b.", "parameters": {"properties": {"a": {"type": "integer"}, "b": {"type":
"integer"}}, "required": ["a", "b"], "type": "object"}}}]}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '534'
User-Agent:
- Python-SDK/0.4.6
content-type:
- application/json
method: POST
uri: https://staging-api.notdiamond.ai/v2/modelRouter/modelSelect
response:
body:
string: '{"providers":[{"provider":"anthropic","model":"claude-haiku-4-5"}],"session_id":"0799fd13-6c94-48de-be45-9e0ef632d9f1"}'
headers:
CF-RAY:
- 9922d0c68ce0e44f-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Tue, 21 Oct 2025 18:28:36 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
content-length:
- '119'
rndr-id:
- 056d6954-bc6d-4d9e
vary:
- Accept-Encoding
x-render-origin-server:
- uvicorn
x-request-id:
- 056d6954-bc6d-4d9e
status:
code: 200
message: OK
- request:
body: '{"max_tokens":200,"messages":[{"role":"user","content":"How much is 3 +
5?"}],"model":"claude-haiku-4-5","tools":[{"name":"add_fct","description":"Adds
a and b.","input_schema":{"properties":{"a":{"type":"integer"},"b":{"type":"integer"}},"required":["a","b"],"type":"object"}}]}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate, zstd
anthropic-version:
- '2023-06-01'
connection:
- keep-alive
content-length:
- '279'
content-type:
- application/json
host:
- api.anthropic.com
user-agent:
- Anthropic/Python 0.49.0
x-api-key:
- REDACTED
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 0.49.0
x-stainless-read-timeout:
- '120.0'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.12
x-stainless-timeout:
- NOT_GIVEN
method: POST
uri: https://api.anthropic.com/v1/messages
response:
body:
string: '{"model":"claude-haiku-4-5-20251001","id":"msg_01ULxjzUy4U6U9KeHvYdx6gS","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01ViL4AbgWuXv3xjasgXknxD","name":"add_fct","input":{"a":3,"b":5}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":580,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":72,"service_tier":"standard"}}'
headers:
CF-RAY:
- 9922d0cfae42c9c7-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Tue, 21 Oct 2025 18:28:37 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Robots-Tag:
- none
anthropic-organization-id:
- a2610b2c-742e-455d-9552-6abe105b2a44
anthropic-ratelimit-input-tokens-limit:
- '4000000'
anthropic-ratelimit-input-tokens-remaining:
- '4000000'
anthropic-ratelimit-input-tokens-reset:
- '2025-10-21T18:28:37Z'
anthropic-ratelimit-output-tokens-limit:
- '800000'
anthropic-ratelimit-output-tokens-remaining:
- '800000'
anthropic-ratelimit-output-tokens-reset:
- '2025-10-21T18:28:37Z'
anthropic-ratelimit-requests-limit:
- '4000'
anthropic-ratelimit-requests-remaining:
- '3999'
anthropic-ratelimit-requests-reset:
- '2025-10-21T18:28:36Z'
anthropic-ratelimit-tokens-limit:
- '4800000'
anthropic-ratelimit-tokens-remaining:
- '4800000'
anthropic-ratelimit-tokens-reset:
- '2025-10-21T18:28:37Z'
cf-cache-status:
- DYNAMIC
content-length:
- '477'
request-id:
- req_011CULpMSFbGcB6DKdBDFAE1
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
via:
- 1.1 google
x-envoy-upstream-service-time:
- '1045'
status:
code: 200
message: OK
version: 1
Loading
Loading