From b4d71a073452927503d0d4f8fc56394cba535e7b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 23:39:12 +0000 Subject: [PATCH 1/2] Initial plan From 27b61c5cca220c4b9a3da943024389d3205bc28c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 23:43:46 +0000 Subject: [PATCH 2/2] Replace Cosmos DB branding with DocumentDB Co-authored-by: diberry <41597107+diberry@users.noreply.github.com> --- .gitignore | 2 ++ ai/vector-search-typescript/.env.example | 2 +- ai/vector-search-typescript/package.json | 4 ++-- ai/vector-search-typescript/src/create-embeddings.ts | 2 +- ai/vector-search-typescript/src/utils.ts | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ce89292..29dab28 100644 --- a/.gitignore +++ b/.gitignore @@ -300,6 +300,8 @@ FakesAssemblies/ # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ +dist/ +package-lock.json # Visual Studio 6 build log *.plg diff --git a/ai/vector-search-typescript/.env.example b/ai/vector-search-typescript/.env.example index 9bf4f8a..0804478 100644 --- a/ai/vector-search-typescript/.env.example +++ b/ai/vector-search-typescript/.env.example @@ -23,7 +23,7 @@ EMBEDDING_DIMENSIONS=1536 LOAD_SIZE_BATCH=100 # ======================================== -# MongoDB/Cosmos DB Connection Settings +# MongoDB/DocumentDB Connection Settings # ======================================== MONGO_CONNECTION_STRING=mongodb+srv://:@.global.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000 MONGO_CLUSTER_NAME= diff --git a/ai/vector-search-typescript/package.json b/ai/vector-search-typescript/package.json index 823fc94..6c9e363 100644 --- a/ai/vector-search-typescript/package.json +++ b/ai/vector-search-typescript/package.json @@ -1,7 +1,7 @@ { - "name": "ts-cosmos-nodejs-vector-samples", + "name": "ts-documentdb-nodejs-vector-samples", "version": "1.0.0", - "description": "Samples for MongoDB vCore vector search with Cosmos DB", + "description": "Samples for MongoDB vCore vector search with DocumentDB", "main": "index.js", "type": "module", "scripts": { diff --git a/ai/vector-search-typescript/src/create-embeddings.ts b/ai/vector-search-typescript/src/create-embeddings.ts index 6524bce..295e451 100644 --- a/ai/vector-search-typescript/src/create-embeddings.ts +++ b/ai/vector-search-typescript/src/create-embeddings.ts @@ -1,7 +1,7 @@ /** * Module for creating embedding vectors using OpenAI API * Supports text embedding models for generating embeddings - * that can be used with Cosmos DB MongoDB vCore vector search + * that can be used with DocumentDB MongoDB vCore vector search */ import * as path from "node:path"; import { AzureOpenAI } from "openai"; diff --git a/ai/vector-search-typescript/src/utils.ts b/ai/vector-search-typescript/src/utils.ts index f557ade..88b7021 100644 --- a/ai/vector-search-typescript/src/utils.ts +++ b/ai/vector-search-typescript/src/utils.ts @@ -61,7 +61,7 @@ export function getClientsPasswordless(): { aiClient: AzureOpenAI | null; dbClie }); } - // For Cosmos DB with DefaultAzureCredential + // For DocumentDB with DefaultAzureCredential const clusterName = process.env.MONGO_CLUSTER_NAME!; if (clusterName) {