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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/zeroentropy-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -41,7 +41,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/zeroentropy-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'zeroentropy-ai/zeroentropy-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.7"
".": "0.1.0-alpha.8"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-c95681b13dc56e64126746c6e546b564c7f802ae567fc9ccc1aeb8eddd40bb1e.yml
openapi_spec_hash: 2ac723122fe938e384f11b5cf19e85ec
config_hash: 3be2ee54cbc850c508c90b9ffae2efe5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-b5badb1383675a2606a4e65b515426cf70010d0e834372de7bcf39fda4939692.yml
openapi_spec_hash: b3b0c03c89fe5ea66cc91fea2fa9726b
config_hash: f5fb1effd4b0e263e1e93de3f573f46f
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.1.0-alpha.8 (2026-01-21)

Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)

### Features

* **api:** manual updates ([f71c152](https://github.com/zeroentropy-ai/zeroentropy-node/commit/f71c1525ceda47151ebe9fc7781fab45bfff4755))


### Bug Fixes

* **mcp:** correct code tool API endpoint ([2bb9b5d](https://github.com/zeroentropy-ai/zeroentropy-node/commit/2bb9b5d1d8ba44e11148d83d52379804e4d8f926))
* **mcp:** return correct lines on typescript errors ([2c02f32](https://github.com/zeroentropy-ai/zeroentropy-node/commit/2c02f322c6eab9455ab0c7b09f900140157899fd))


### Chores

* break long lines in snippets into multiline ([3d7a070](https://github.com/zeroentropy-ai/zeroentropy-node/commit/3d7a0702dde4a0070df30c6bee019382c10dca33))
* **internal:** codegen related update ([f287ef1](https://github.com/zeroentropy-ai/zeroentropy-node/commit/f287ef1b8a266a4d55104a7a0807c1763663d60f))
* **internal:** codegen related update ([d32a969](https://github.com/zeroentropy-ai/zeroentropy-node/commit/d32a969b62c4a471129529fb3a22355e1cf96ced))
* **internal:** codegen related update ([fe15e37](https://github.com/zeroentropy-ai/zeroentropy-node/commit/fe15e3763ab7d9e87e9928e2ef0d1a2b1e66afe3))
* **internal:** update `actions/checkout` version ([a07ac5f](https://github.com/zeroentropy-ai/zeroentropy-node/commit/a07ac5f9351e87e9d43ff238e0fed102b6c6a799))
* **internal:** upgrade babel, qs, js-yaml ([7e42bbf](https://github.com/zeroentropy-ai/zeroentropy-node/commit/7e42bbf89e286b7ec07938a28850b10a883b4710))

## 0.1.0-alpha.7 (2025-11-24)

Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 ZeroEntropy
Copyright 2026 ZeroEntropy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zeroentropy",
"version": "0.1.0-alpha.7",
"version": "0.1.0-alpha.8",
"description": "The official TypeScript library for the ZeroEntropy API",
"author": "ZeroEntropy <founders@zeroentropy.dev>",
"types": "dist/index.d.ts",
Expand Down
14 changes: 7 additions & 7 deletions src/resources/documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ export interface DocumentUpdateResponse {
}

export interface DocumentDeleteResponse {
/**
* This string will always be "Success!". This may change in the future.
*/
message?: string;
deleted_paths: Array<string>;
}

export interface DocumentAddResponse {
Expand Down Expand Up @@ -300,10 +297,13 @@ export interface DocumentDeleteParams {
collection_name: string;

/**
* The filepath of the document that you are deleting. A `404 Not Found` status
* code will be returned if no document with this path was found.
* The path(s) of the document(s) that you are deleting. Must be either a `string`,
* or a `list[str]` between 1 and 64 inclusive. A `404 Not Found` status code will
* be returned if no document(s) with this path was found. If at least one of the
* paths provided do exist, then `200 OK` will be returned, along with an array of
* the document paths that were found and thus deleted.
*/
path: string;
path: string | Array<string>;
}

export interface DocumentAddParams {
Expand Down
36 changes: 35 additions & 1 deletion src/resources/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Models extends APIResource {
*
* Organizations will, by default, have a ratelimit of `2,500,000`
* bytes-per-minute. If this is exceeded, requests will be throttled into
* `latency: "slow"` mode, up to `10,000,000` bytes-per-minute. If even this is
* `latency: "slow"` mode, up to `20,000,000` bytes-per-minute. If even this is
* exceeded, you will get a `429` error. To request higher ratelimits, please
* contact [founders@zeroentropy.dev](mailto:founders@zeroentropy.dev) or message
* us on [Discord](https://go.zeroentropy.dev/discord) or
Expand All @@ -27,10 +27,44 @@ export class Models extends APIResource {
}

export interface ModelRerankResponse {
/**
* The type of inference actually used. If `auto` is requested, then `fast` will be
* used by default, with `slow` as a fallback if your ratelimit is exceeded. Else,
* this field will be identical to the requested latency mode.
*/
actual_latency_mode: 'fast' | 'slow';

/**
* The total time, in seconds, between rerank request received and rerank response
* returned. Client latency should equal `e2e_latency` + your ping to ZeroEntropy's
* API.
*/
e2e_latency: number;

/**
* The time, in seconds, to actually inference the request. If this is
* significantly lower than `e2e_latency`, this is likely due to ratelimiting.
* Please request a higher ratelimit at
* [founders@zeroentropy.dev](mailto:founders@zeroentropy.dev) or message us on
* [Discord](https://go.zeroentropy.dev/discord) or
* [Slack](https://go.zeroentropy.dev/slack)!
*/
inference_latency: number;

/**
* The results, ordered by descending order of relevance to the query.
*/
results: Array<ModelRerankResponse.Result>;

/**
* The total number of bytes in the request. This is used for ratelimiting.
*/
total_bytes: number;

/**
* The total number of tokens in the request. This is used for billing.
*/
total_tokens: number;
}

export namespace ModelRerankResponse {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.1.0-alpha.7'; // x-release-please-version
export const VERSION = '0.1.0-alpha.8'; // x-release-please-version
4 changes: 2 additions & 2 deletions tests/api-resources/documents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('resource documents', () => {
});

test('delete: only required params', async () => {
const responsePromise = client.documents.delete({ collection_name: 'collection_name', path: 'path' });
const responsePromise = client.documents.delete({ collection_name: 'collection_name', path: 'string' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -41,7 +41,7 @@ describe('resource documents', () => {
});

test('delete: required and optional params', async () => {
const response = await client.documents.delete({ collection_name: 'collection_name', path: 'path' });
const response = await client.documents.delete({ collection_name: 'collection_name', path: 'string' });
});

test('add: only required params', async () => {
Expand Down
6 changes: 5 additions & 1 deletion tests/api-resources/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const client = new ZeroEntropy({

describe('resource models', () => {
test('rerank: only required params', async () => {
const responsePromise = client.models.rerank({ documents: ['string'], model: 'model', query: 'query' });
const responsePromise = client.models.rerank({
documents: ['string'],
model: 'model',
query: 'query',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand Down
24 changes: 20 additions & 4 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};

const client = new ZeroEntropy({ apiKey: 'My API Key', timeout: 10, fetch: testFetch });
const client = new ZeroEntropy({
apiKey: 'My API Key',
timeout: 10,
fetch: testFetch,
});

expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });
expect(count).toEqual(2);
Expand Down Expand Up @@ -306,7 +310,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};

const client = new ZeroEntropy({ apiKey: 'My API Key', fetch: testFetch, maxRetries: 4 });
const client = new ZeroEntropy({
apiKey: 'My API Key',
fetch: testFetch,
maxRetries: 4,
});

expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });

Expand All @@ -330,7 +338,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
const client = new ZeroEntropy({ apiKey: 'My API Key', fetch: testFetch, maxRetries: 4 });
const client = new ZeroEntropy({
apiKey: 'My API Key',
fetch: testFetch,
maxRetries: 4,
});

expect(
await client.request({
Expand Down Expand Up @@ -392,7 +404,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
const client = new ZeroEntropy({ apiKey: 'My API Key', fetch: testFetch, maxRetries: 4 });
const client = new ZeroEntropy({
apiKey: 'My API Key',
fetch: testFetch,
maxRetries: 4,
});

expect(
await client.request({
Expand Down
Loading