This repository was archived by the owner on Dec 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Add support for claude-sonnet-4.5 model #106
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5a4aaca
feat: Add support for claude-sonnet-4.5 model
dragos199993 bd2b7f6
fix: Correct claude-sonnet-4.5 references in settings and providers
dragos199993 916953b
fix: Add new test cassettes for claude-sonnet-4-5 model interactions
dragos199993 b71256d
feat: Add claude-sonnet-4-5-20250929 model to NDLLMProviders enum
dragos199993 32af8f8
add dated version to settings
r0ymanesco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,6 +156,8 @@ | |
| "claude-opus-4-20250514", | ||
| "claude-opus-4-1-20250805", | ||
| "claude-sonnet-4-20250514", | ||
| "claude-sonnet-4-5", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to add the dated one here as well |
||
| "claude-sonnet-4-5-20250929", | ||
| "claude-opus-4-0", | ||
| "claude-opus-4-1", | ||
| "claude-sonnet-4-0", | ||
|
|
@@ -174,6 +176,8 @@ | |
| "claude-opus-4-20250514", | ||
| "claude-opus-4-1-20250805", | ||
| "claude-sonnet-4-20250514", | ||
| "claude-sonnet-4-5", | ||
| "claude-sonnet-4-5-20250929", | ||
| "claude-opus-4-0", | ||
| "claude-opus-4-1", | ||
| "claude-sonnet-4-0", | ||
|
|
@@ -195,6 +199,8 @@ | |
| "claude-opus-4-20250514": "anthropic/claude-opus-4", | ||
| "claude-opus-4-1-20250805": "anthropic/claude-opus-4-1-20250805", | ||
| "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-opus-4-0": "anthropic/claude-opus-4", | ||
| "claude-opus-4-1": "anthropic/claude-opus-4-1", | ||
| "claude-sonnet-4-0": "anthropic/claude-sonnet-4", | ||
|
|
@@ -213,6 +219,8 @@ | |
| "claude-opus-4-20250514": {"input": 15.0, "output": 75.0}, | ||
| "claude-opus-4-1-20250805": {"input": 15.0, "output": 75.0}, | ||
| "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-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}, | ||
|
|
||
162 changes: 162 additions & 0 deletions
162
...s/test_anthropic/Test_Anthropic_LLMs.test_claude_sonnet_4_5_with_openai_tool_calling.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-sonnet-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: | ||
| - '608' | ||
| 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: '{"detail":"Provider claude-sonnet-4-5 not recognized."}' | ||
| headers: | ||
| CF-RAY: | ||
| - 98c6e24f0e9c0547-OTP | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 10 Oct 2025 14:42:24 GMT | ||
| Server: | ||
| - cloudflare | ||
| Transfer-Encoding: | ||
| - chunked | ||
| alt-svc: | ||
| - h3=":443"; ma=86400 | ||
| cf-cache-status: | ||
| - DYNAMIC | ||
| rndr-id: | ||
| - 0876ff1a-9b5a-4b8d | ||
| vary: | ||
| - Accept-Encoding | ||
| x-render-origin-server: | ||
| - uvicorn | ||
| x-request-id: | ||
| - 0876ff1a-9b5a-4b8d | ||
| status: | ||
| code: 400 | ||
| message: Bad Request | ||
| - request: | ||
| body: '{"max_tokens":200,"messages":[{"role":"user","content":"How much is 3 + | ||
| 5?"}],"model":"claude-sonnet-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: | ||
| - '349' | ||
| 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-sonnet-4-5-20250929","id":"msg_018RH9GR3icDmyGZgXN89e5a","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01NDJdQv5LWScdEQTtPEsHKJ","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":71,"service_tier":"standard"}}' | ||
| headers: | ||
| CF-RAY: | ||
| - 98c6e256b8dfe441-OTP | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 10 Oct 2025 14:42:27 GMT | ||
| Server: | ||
| - cloudflare | ||
| Transfer-Encoding: | ||
| - chunked | ||
| X-Robots-Tag: | ||
| - none | ||
| anthropic-organization-id: | ||
| - a2610b2c-742e-455d-9552-6abe105b2a44 | ||
| anthropic-ratelimit-input-tokens-limit: | ||
| - '2000000' | ||
| anthropic-ratelimit-input-tokens-remaining: | ||
| - '2000000' | ||
| anthropic-ratelimit-input-tokens-reset: | ||
| - '2025-10-10T14:42:26Z' | ||
| anthropic-ratelimit-output-tokens-limit: | ||
| - '400000' | ||
| anthropic-ratelimit-output-tokens-remaining: | ||
| - '400000' | ||
| anthropic-ratelimit-output-tokens-reset: | ||
| - '2025-10-10T14:42:27Z' | ||
| anthropic-ratelimit-requests-limit: | ||
| - '4000' | ||
| anthropic-ratelimit-requests-remaining: | ||
| - '3999' | ||
| anthropic-ratelimit-requests-reset: | ||
| - '2025-10-10T14:42:24Z' | ||
| anthropic-ratelimit-tokens-limit: | ||
| - '2400000' | ||
| anthropic-ratelimit-tokens-remaining: | ||
| - '2400000' | ||
| anthropic-ratelimit-tokens-reset: | ||
| - '2025-10-10T14:42:26Z' | ||
| cf-cache-status: | ||
| - DYNAMIC | ||
| content-length: | ||
| - '478' | ||
| request-id: | ||
| - req_011CTyhCuxKyzFdmUyckYkQt | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| via: | ||
| - 1.1 google | ||
| x-envoy-upstream-service-time: | ||
| - '2541' | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
160 changes: 160 additions & 0 deletions
160
...assettes/test_anthropic/Test_Anthropic_LLMs.test_claude_sonnet_4_5_with_tool_calling.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"messages": [{"role": "user", "content": "How much is 3 + 5?"}], "llm_providers": | ||
| [{"provider": "anthropic", "model": "claude-sonnet-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: | ||
| - '535' | ||
| 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: '{"detail":"Provider claude-sonnet-4-5 not recognized."}' | ||
| headers: | ||
| CF-RAY: | ||
| - 98c6e2378e83f4c8-OTP | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 10 Oct 2025 14:42:20 GMT | ||
| Server: | ||
| - cloudflare | ||
| Transfer-Encoding: | ||
| - chunked | ||
| alt-svc: | ||
| - h3=":443"; ma=86400 | ||
| cf-cache-status: | ||
| - DYNAMIC | ||
| rndr-id: | ||
| - 2f0bfe9a-ece0-4332 | ||
| vary: | ||
| - Accept-Encoding | ||
| x-render-origin-server: | ||
| - uvicorn | ||
| x-request-id: | ||
| - 2f0bfe9a-ece0-4332 | ||
| status: | ||
| code: 400 | ||
| message: Bad Request | ||
| - request: | ||
| body: '{"max_tokens":200,"messages":[{"role":"user","content":"How much is 3 + | ||
| 5?"}],"model":"claude-sonnet-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: | ||
| - '280' | ||
| 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-sonnet-4-5-20250929","id":"msg_01StJ39QiZdUGC7E3Fh8egWe","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_013TiR2TGDYy3NgUcM54SMKi","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":71,"service_tier":"standard"}}' | ||
| headers: | ||
| CF-RAY: | ||
| - 98c6e23e088b48d5-OTP | ||
| Connection: | ||
| - keep-alive | ||
| Content-Type: | ||
| - application/json | ||
| Date: | ||
| - Fri, 10 Oct 2025 14:42:23 GMT | ||
| Server: | ||
| - cloudflare | ||
| Transfer-Encoding: | ||
| - chunked | ||
| X-Robots-Tag: | ||
| - none | ||
| anthropic-organization-id: | ||
| - a2610b2c-742e-455d-9552-6abe105b2a44 | ||
| anthropic-ratelimit-input-tokens-limit: | ||
| - '2000000' | ||
| anthropic-ratelimit-input-tokens-remaining: | ||
| - '2000000' | ||
| anthropic-ratelimit-input-tokens-reset: | ||
| - '2025-10-10T14:42:22Z' | ||
| anthropic-ratelimit-output-tokens-limit: | ||
| - '400000' | ||
| anthropic-ratelimit-output-tokens-remaining: | ||
| - '400000' | ||
| anthropic-ratelimit-output-tokens-reset: | ||
| - '2025-10-10T14:42:22Z' | ||
| anthropic-ratelimit-requests-limit: | ||
| - '4000' | ||
| anthropic-ratelimit-requests-remaining: | ||
| - '3999' | ||
| anthropic-ratelimit-requests-reset: | ||
| - '2025-10-10T14:42:20Z' | ||
| anthropic-ratelimit-tokens-limit: | ||
| - '2400000' | ||
| anthropic-ratelimit-tokens-remaining: | ||
| - '2400000' | ||
| anthropic-ratelimit-tokens-reset: | ||
| - '2025-10-10T14:42:22Z' | ||
| cf-cache-status: | ||
| - DYNAMIC | ||
| content-length: | ||
| - '478' | ||
| request-id: | ||
| - req_011CTyhCd4aSLGxzcDbVsRCP | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| via: | ||
| - 1.1 google | ||
| x-envoy-upstream-service-time: | ||
| - '2403' | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also add the dated versino