Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @anthropic-ai/sdk to v0.29.0 #194

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 16, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@anthropic-ai/sdk 0.28.0 -> 0.29.0 age adoption passing confidence

Release Notes

anthropics/anthropic-sdk-typescript (@​anthropic-ai/sdk)

v0.29.0

Full Changelog: sdk-v0.28.0...sdk-v0.29.0

Features
  • api: add message batches api (4f114d5)
Chores
Refactors

Configuration

📅 Schedule: Branch creation - "* 0-4 * * 3" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

anthropic debug - [puLL-Merge] - anthropics/anthropic-sdk-typescript@sdk-v0.28.0..sdk-v0.29.0

Description

This PR introduces several significant changes to the Anthropic TypeScript SDK, including the addition of a new Message Batches API, improvements to type definitions, and various refactoring changes. The main additions are:

  1. Message Batches API: A new beta feature for processing multiple Messages API requests at once.
  2. Improved type definitions for metadata and tool-related types.
  3. Pagination support for listing Message Batches.
  4. New examples and tests for the Message Batches API.
Changes

Changes

  1. src/resources/beta/messages/batches.ts:

    • Added new Batches class with methods for creating, retrieving, listing, canceling, and getting results from Message Batches.
    • Introduced new types for Message Batch responses and results.
  2. src/resources/beta/messages/messages.ts:

    • Updated Messages class to include the new batches property.
    • Improved type definitions for various message-related types.
  3. src/pagination.ts:

    • Added new Page class for handling paginated responses.
  4. README.md:

    • Added documentation for the new Message Batches API.
    • Updated examples to include Message Batches usage.
  5. Various files:

    • Refactored and improved type definitions, especially for metadata and tool-related types.
    • Updated version numbers in package.json files.
  6. src/internal/decoders/jsonl.ts and src/internal/decoders/line.ts:

    • Added new utility classes for decoding JSONL and line-based responses.
  7. tests/api-resources/beta/messages/batches.test.ts:

    • Added new tests for the Message Batches API.

Possible Issues

  • The introduction of the new Message Batches API as a beta feature may require additional testing and documentation to ensure proper usage and understanding by developers.
  • The changes to type definitions, especially for metadata and tool-related types, may require updates in existing code that uses the SDK.

Security Hotspots

None identified. The changes appear to be focused on API functionality and type improvements, with no apparent security implications.

Copy link

bedrock debug - [puLL-Merge] - anthropics/anthropic-sdk-typescript@sdk-v0.28.0..sdk-v0.29.0

Description

This PR introduces support for the Message Batches API in the Anthropic TypeScript SDK. It adds new endpoints, types, and functionality related to creating and managing batches of message requests. The PR also includes various refactoring changes and improvements to existing types and structures.

Changes

Changes

  1. src/resources/beta/messages/batches.ts:

    • Added new Batches class with methods for creating, retrieving, listing, canceling, and getting results for message batches.
    • Introduced new types for batch-related operations and responses.
  2. src/resources/beta/messages/messages.ts:

    • Updated the Messages class to include the new batches resource.
    • Added new types and interfaces for beta message-related operations.
  3. src/pagination.ts:

    • Added new Page and PageResponse types to support pagination for batch listing.
  4. src/internal/decoders/jsonl.ts and src/internal/decoders/line.ts:

    • Added new decoders for handling JSONL responses from the batch results endpoint.
  5. README.md:

    • Updated with documentation for the new Message Batches API, including examples for creating batches and retrieving results.
  6. Various other files:

    • Updated version numbers, changelog entries, and exported types to reflect the new functionality.
    • Refactored some existing types for better consistency and reusability.

Possible Issues

  1. The new batch functionality is marked as beta, which may imply potential changes or instability in future releases.

  2. The introduction of new beta types and interfaces might lead to some confusion for users who are familiar with the existing stable API. Clear documentation and migration guides may be necessary.

Security Hotspots

There are no apparent security vulnerabilities introduced by this change. However, as with any API that handles user data, care should be taken to ensure that sensitive information is not inadvertently exposed through the new batch operations.

Copy link

openai debug - [puLL-Merge] - anthropics/anthropic-sdk-typescript@sdk-v0.28.0..sdk-v0.29.0

Description

This pull request introduces a new beta feature for the Anthropic SDK: the Message Batches API. The main changes include the addition of batch messaging capabilities that allow users to submit multiple API requests at once and retrieve results in batch form. This feature is added to the client.beta.messages.batches namespace. The PR also includes support for auto-pagination and several enhancements to the internal API and tool typing structures.

Security Hotspots

  1. New Batch API Endpoints:
    • The newly introduced batch API endpoints should be thoroughly tested and reviewed to ensure that they handle input validation and authentication correctly.
    • Ensure the handling of large batches does not expose any denial-of-service (DoS) vulnerabilities.
Changes

Changes

  1. Config Files:

    • .release-please-manifest.json: Updated versions for main package and sub-packages.
    • .stats.yml: Increased configured endpoints from 3 to 9 and updated the OpenAPI spec URL.
  2. Documentation Files:

    • CHANGELOG.md: Documented the addition of the Message Batches API and internal refactors.
    • README.md: Added comprehensive documentation for the new Message Batches feature and auto-pagination capabilities.
    • api.md: Included type definitions and methods for new beta features under the Batches namespace.
  3. Example & Test Files:

    • examples/batch-results.ts: Added an example script demonstrating how to fetch batch results.
    • tests/api-resources/beta/messages/batches.test.ts: Added tests to verify Message Batches API functionality.
    • tests/api-resources/beta/messages/messages.test.ts: Added tests for the new beta messages create functionality.
  4. Source Code Files:

    • package.json: Bumped version to 0.29.0.
    • src/core.ts: Modified internal _thenUnwrap method to pass props to the transformation function.
    • src/index.ts: Added imports for pagination and updated exports to include new types and methods.
    • src/internal/decoders/jsonl.ts: Added a new decoder for handling JSONL formatted data.
    • src/internal/decoders/line.ts: Moved existing LineDecoder implementation to a separate file for better internal module management.
    • src/pagination.ts: Introduced a new Page class to support auto-pagination.
    • src/resources/beta/beta.ts: Added the new Message Batches API and related type definitions.
    • src/resources/beta/messages/batches.ts: Defined Message Batches resource endpoints and types.
    • src/resources/beta/messages/index.ts: Included new types and methods for the Message Batches feature.
    • src/resources/beta/messages/messages.ts: Added Message Batches methods and types.
    • src/resources/completions.ts: Updated metadata type reference to use shared MessagesAPI module.
    • src/resources/index.ts: Added batch types and methods export.
    • src/resources/messages.ts: Included new types and methods for better metadata handling and tool usage.
    • src/streaming.ts: Refactored to use the moved LineDecoder.
    • src/version.ts: Bumped version to 0.29.0.

@thypon thypon merged commit d9be237 into main Oct 16, 2024
8 checks passed
@thypon thypon deleted the renovate/anthropic-ai-sdk-0.x branch October 16, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant