From 2791d532a3a521c7c0a654b63e483d4db7583f32 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 4 Aug 2026 11:59:57 +0000
Subject: [PATCH 1/2] SDK regeneration
---
.fern/metadata.json | 4 ++--
pnpm-lock.yaml | 8 ++++----
src/api/resources/codes/client/Client.ts | 2 +-
src/api/types/CommonCodingSystemEnum.ts | 7 +++++++
src/api/types/GuidedEphemeralDocument.ts | 2 +-
.../types/CommonCodingSystemEnum.ts | 16 +++++++++++++++-
.../types/GuidedEphemeralDocument.ts | 4 ++--
tests/wire/documents.test.ts | 4 ++--
8 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/.fern/metadata.json b/.fern/metadata.json
index ebb0cb8b..c0021e2b 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,5 +1,5 @@
{
- "cliVersion": "5.75.1",
+ "cliVersion": "5.80.4",
"generatorName": "fernapi/fern-typescript-node-sdk",
"generatorVersion": "3.54.0",
"generatorConfig": {
@@ -34,6 +34,6 @@
}
}
},
- "originGitCommit": "94a714862b705ee097af1b7ef3c5d9affa7fc382",
+ "originGitCommit": "7bbc721308055a6c33033d729c847911cc6ee9a0",
"sdkVersion": "0.0.0-dev"
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b947f95d..99d8961f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -10,7 +10,7 @@ importers:
dependencies:
ws:
specifier: ^8.16.0
- version: 8.21.1
+ version: 8.21.2
devDependencies:
'@biomejs/biome':
specifier: 2.4.3
@@ -1146,8 +1146,8 @@ packages:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
- ws@8.21.1:
- resolution: {integrity: sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==}
+ ws@8.21.2:
+ resolution: {integrity: sha512-54dMVAo4WIe6SKy3vBgN+9bJZqqQ8IMRevAkOLQALhi49qkkQDQfWdAZ8KQlXiEabw88ARXXdUrlvtbKQX+aKw==}
engines: {node: '>=10.0.0'}
peerDependencies:
bufferutil: ^4.0.1
@@ -2163,7 +2163,7 @@ snapshots:
string-width: 4.2.3
strip-ansi: 6.0.1
- ws@8.21.1: {}
+ ws@8.21.2: {}
y18n@5.0.8: {}
diff --git a/src/api/resources/codes/client/Client.ts b/src/api/resources/codes/client/Client.ts
index fc372036..04fb9f36 100644
--- a/src/api/resources/codes/client/Client.ts
+++ b/src/api/resources/codes/client/Client.ts
@@ -23,7 +23,7 @@ export class CodesClient {
}
/**
- * Predict medical codes from provided context.
This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, ICD-10 (international), ICD-10-UK, CIM-10-FR, ICD-10-GM, OPCS-4, OPS, CCAM and CPT codes based on input text string or documentId.
More than one code system may be defined in a single request.
Code prediction requests have two possible values for context:
- `text`: One set of code prediction results will be returned based on all input text defined.
- `documentId`: Code prediction will be based on that defined document only.
The response includes two sets of results:
- `Codes`: Codes predicted by the model.
- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.
All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).
+ * Predict medical codes from provided context.
This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, ICD-10 (international), ICD-10-UK, CIM-10-FR, ICD-10-GM, OPCS-4, OPS, CCAM, CPT and SNOMED CT codes based on input text string or documentId.
More than one code system may be defined in a single request.
Code prediction requests have two possible values for context:
- `text`: One set of code prediction results will be returned based on all input text defined.
- `documentId`: Code prediction will be based on that defined document only.
The response includes two sets of results:
- `Codes`: Codes predicted by the model.
- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.
All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).
*
* @param {Corti.CodesGeneralPredictRequest} request
* @param {CodesClient.RequestOptions} requestOptions - Request-specific configuration.
diff --git a/src/api/types/CommonCodingSystemEnum.ts b/src/api/types/CommonCodingSystemEnum.ts
index 3088eee2..35b845db 100644
--- a/src/api/types/CommonCodingSystemEnum.ts
+++ b/src/api/types/CommonCodingSystemEnum.ts
@@ -17,5 +17,12 @@ export const CommonCodingSystemEnum = {
Ops: "ops",
Ccam: "ccam",
Snomedctint: "snomedctint",
+ Snomedctde: "snomedctde",
+ Snomedctfr: "snomedctfr",
+ Snomedctuk: "snomedctuk",
+ Snomedctes: "snomedctes",
+ Snomedctdk: "snomedctdk",
+ Snomedctse: "snomedctse",
+ Snomedctus: "snomedctus",
} as const;
export type CommonCodingSystemEnum = (typeof CommonCodingSystemEnum)[keyof typeof CommonCodingSystemEnum];
diff --git a/src/api/types/GuidedEphemeralDocument.ts b/src/api/types/GuidedEphemeralDocument.ts
index 5b42d461..f0a96122 100644
--- a/src/api/types/GuidedEphemeralDocument.ts
+++ b/src/api/types/GuidedEphemeralDocument.ts
@@ -10,7 +10,7 @@ export interface GuidedEphemeralDocument {
templateId: string;
templateVersionId: string;
/** The BCP 47 language tag of the generated output. */
- language: string;
+ outputLanguage: string;
/** The interaction whose context was used to generate this document, if supplied. */
interactionId?: string | null;
stringDocument: Record;
diff --git a/src/serialization/types/CommonCodingSystemEnum.ts b/src/serialization/types/CommonCodingSystemEnum.ts
index e72a9e43..898122a9 100644
--- a/src/serialization/types/CommonCodingSystemEnum.ts
+++ b/src/serialization/types/CommonCodingSystemEnum.ts
@@ -24,6 +24,13 @@ export const CommonCodingSystemEnum: core.serialization.Schema<
"ops",
"ccam",
"snomedctint",
+ "snomedctde",
+ "snomedctfr",
+ "snomedctuk",
+ "snomedctes",
+ "snomedctdk",
+ "snomedctse",
+ "snomedctus",
]);
export declare namespace CommonCodingSystemEnum {
@@ -43,5 +50,12 @@ export declare namespace CommonCodingSystemEnum {
| "opcs4"
| "ops"
| "ccam"
- | "snomedctint";
+ | "snomedctint"
+ | "snomedctde"
+ | "snomedctfr"
+ | "snomedctuk"
+ | "snomedctes"
+ | "snomedctdk"
+ | "snomedctse"
+ | "snomedctus";
}
diff --git a/src/serialization/types/GuidedEphemeralDocument.ts b/src/serialization/types/GuidedEphemeralDocument.ts
index 516b6235..98fe685f 100644
--- a/src/serialization/types/GuidedEphemeralDocument.ts
+++ b/src/serialization/types/GuidedEphemeralDocument.ts
@@ -12,7 +12,7 @@ export const GuidedEphemeralDocument: core.serialization.ObjectSchema<
name: core.serialization.string(),
templateId: core.serialization.string(),
templateVersionId: core.serialization.string(),
- language: core.serialization.string(),
+ outputLanguage: core.serialization.string(),
interactionId: core.serialization.string().optionalNullable(),
stringDocument: core.serialization.record(core.serialization.string(), core.serialization.string()),
structuredDocument: core.serialization
@@ -26,7 +26,7 @@ export declare namespace GuidedEphemeralDocument {
name: string;
templateId: string;
templateVersionId: string;
- language: string;
+ outputLanguage: string;
interactionId?: (string | null | undefined) | null;
stringDocument: Record;
structuredDocument?: (Record | null | undefined) | null;
diff --git a/tests/wire/documents.test.ts b/tests/wire/documents.test.ts
index 1f3e4b3e..70544566 100644
--- a/tests/wire/documents.test.ts
+++ b/tests/wire/documents.test.ts
@@ -1030,7 +1030,7 @@ describe("DocumentsClient", () => {
name: "name",
templateId: "templateId",
templateVersionId: "templateVersionId",
- language: "language",
+ outputLanguage: "outputLanguage",
interactionId: "interactionId",
stringDocument: { key: "value" },
structuredDocument: { key: "value" },
@@ -1059,7 +1059,7 @@ describe("DocumentsClient", () => {
name: "name",
templateId: "templateId",
templateVersionId: "templateVersionId",
- language: "language",
+ outputLanguage: "outputLanguage",
interactionId: "interactionId",
stringDocument: {
key: "value",
From 2323c5a5e9db88a665590d7900f2c39ba5d42d04 Mon Sep 17 00:00:00 2001
From: markitosha
Date: Tue, 4 Aug 2026 14:20:02 +0200
Subject: [PATCH 2/2] Cover SNOMED coding systems, guided outputLanguage, and
namespaced experts in integration tests.
---
tests/custom/agents.create.integration.ts | 23 +++
tests/custom/codes.predict.integration.ts | 132 ++++++++++++++++++
.../custom/documents.generate.integration.ts | 3 +-
3 files changed, 157 insertions(+), 1 deletion(-)
diff --git a/tests/custom/agents.create.integration.ts b/tests/custom/agents.create.integration.ts
index a54fd497..9bf53a33 100644
--- a/tests/custom/agents.create.integration.ts
+++ b/tests/custom/agents.create.integration.ts
@@ -156,6 +156,29 @@ describe("cortiClient.agents.create", () => {
expect(result).toBeDefined();
expect(consoleWarnSpy).not.toHaveBeenCalled();
});
+
+ it("should create agent with a namespaced inline expert name without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const namespace = faker.string.alphanumeric(8).toLowerCase();
+ const expertName = faker.string.alphanumeric(8).toLowerCase();
+
+ const result = await cortiClient.agents.create({
+ name: faker.lorem.words(3),
+ description: faker.lorem.sentence(),
+ experts: [
+ {
+ type: "new",
+ name: `@${namespace}/${expertName}`,
+ description: faker.lorem.sentence(),
+ systemPrompt: faker.lorem.paragraph(),
+ },
+ ],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
});
describe("should throw error when invalid parameters are provided", () => {
diff --git a/tests/custom/codes.predict.integration.ts b/tests/custom/codes.predict.integration.ts
index 248a67cc..89547024 100644
--- a/tests/custom/codes.predict.integration.ts
+++ b/tests/custom/codes.predict.integration.ts
@@ -209,6 +209,138 @@ describe("cortiClient.codes.predict", () => {
expect(result).toBeDefined();
expect(consoleWarnSpy).not.toHaveBeenCalled();
});
+
+ it("should predict codes with system snomedctint without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctint"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with system snomedctde without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctde"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with system snomedctfr without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctfr"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with system snomedctuk without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctuk"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with system snomedctes without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctes"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with system snomedctdk without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctdk"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with system snomedctse without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctse"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with system snomedctus without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: ["snomedctus"],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
+
+ it("should predict codes with max allowed system enum values without errors or warnings", async () => {
+ expect.assertions(2);
+
+ const result = await cortiClient.codes.predict({
+ system: [
+ "icd10cm-inpatient",
+ "icd10cm-outpatient",
+ "icd10pcs",
+ "cpt",
+ "icd10int-inpatient",
+ "icd10int-outpatient",
+ "icd10uk-inpatient",
+ "icd10uk-outpatient",
+ "cim10fr-inpatient",
+ "cim10fr-outpatient",
+ "icd10gm-inpatient",
+ "icd10gm-outpatient",
+ "opcs4",
+ "ops",
+ "ccam",
+ "snomedctint",
+ "snomedctde",
+ "snomedctfr",
+ "snomedctuk",
+ "snomedctes",
+ "snomedctdk",
+ "snomedctse",
+ "snomedctus",
+ ],
+ context: [{ type: "text", text: faker.lorem.sentence() }],
+ });
+
+ expect(result).toBeDefined();
+ expect(consoleWarnSpy).not.toHaveBeenCalled();
+ });
});
describe("should predict codes with documentId context", () => {
diff --git a/tests/custom/documents.generate.integration.ts b/tests/custom/documents.generate.integration.ts
index f0bf6cc4..8dc7cc4d 100644
--- a/tests/custom/documents.generate.integration.ts
+++ b/tests/custom/documents.generate.integration.ts
@@ -20,7 +20,7 @@ describe("cortiClient.documents.generate", () => {
describe("should generate guided document with dynamicTemplate and only required values", () => {
it("should generate document using inline template and text context without errors or warnings", async () => {
- expect.assertions(2);
+ expect.assertions(3);
const result = await cortiClient.documents.generate({
outputLanguage: "en",
@@ -51,6 +51,7 @@ describe("cortiClient.documents.generate", () => {
},
});
+ expect(result.document.outputLanguage).toBe("en");
expect(result).toBeDefined();
expect(consoleWarnSpy).not.toHaveBeenCalled();
});