Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1295d51
add feature flag
mabaasit Nov 25, 2025
7a44de4
migrate prompts to compass
mabaasit Nov 25, 2025
2e2defe
Merge branch 'main' into COMPASS-10082-add-mms-prompts-and-feature-flag
mabaasit Nov 25, 2025
d524682
co-pilot feedback
mabaasit Nov 25, 2025
f9212fb
Merge branch 'COMPASS-10082-add-mms-prompts-and-feature-flag' of http…
mabaasit Nov 25, 2025
c96161b
clean up
mabaasit Dec 1, 2025
f499026
Merge branch 'main' into COMPASS-10082-add-mms-prompts-and-feature-flag
mabaasit Dec 1, 2025
f4d05a7
use edu api for gen ai
mabaasit Dec 1, 2025
1763531
clean up a bit
mabaasit Dec 1, 2025
d5e2c84
fix url for test and ensure aggregations have content
mabaasit Dec 2, 2025
0781580
tests
mabaasit Dec 3, 2025
058e950
fix error handling
mabaasit Dec 3, 2025
7d54d4d
clean up transport
mabaasit Dec 3, 2025
0aa7ff5
Merge branch 'main' of https://github.com/mongodb-js/compass into COM…
mabaasit Dec 3, 2025
309335a
changes in field name
mabaasit Dec 3, 2025
feacddc
use query parser
mabaasit Dec 3, 2025
c321983
fix check
mabaasit Dec 3, 2025
f5a34df
fix test
mabaasit Dec 3, 2025
91b17d5
clean up
mabaasit Dec 3, 2025
ea4dfdf
copilot feedback
mabaasit Dec 3, 2025
f8a4c43
fix log id
mabaasit Dec 3, 2025
8190219
fix cors issue on e2e tests
mabaasit Dec 4, 2025
c444cb9
more tests
mabaasit Dec 4, 2025
6eec8db
add type
mabaasit Dec 4, 2025
25c8089
wip
mabaasit Dec 8, 2025
9b4c9b7
fix alltext
mabaasit Dec 8, 2025
5e6d537
make expected output xml string
mabaasit Dec 9, 2025
d1b0b51
add fixtures and run gen ai eval tests
mabaasit Dec 10, 2025
1b7343f
ts fixes
mabaasit Dec 10, 2025
a1b38c5
reformat
mabaasit Dec 10, 2025
79e9910
clean up scorer
mabaasit Dec 10, 2025
821917d
Merge branch 'main' of https://github.com/mongodb-js/compass into eva…
mabaasit Dec 11, 2025
3bc7295
bootstrap
mabaasit Dec 11, 2025
eb49493
remove extra files
mabaasit Dec 11, 2025
fa1cf6f
Merge branch 'main' of https://github.com/mongodb-js/compass into eva…
mabaasit Dec 15, 2025
edc5e73
bootstrap
mabaasit Dec 15, 2025
718e8b7
fix prompts and data
mabaasit Dec 15, 2025
5244598
Merge branch 'main' of https://github.com/mongodb-js/compass into eva…
mabaasit Dec 15, 2025
534b0d8
copilot review
mabaasit Dec 15, 2025
d0568ff
reduce num of docs
mabaasit Dec 16, 2025
40ad7c9
reduce fixtures
mabaasit Dec 16, 2025
48b38ce
Merge branch 'main' of https://github.com/mongodb-js/compass into eva…
mabaasit Dec 16, 2025
6153f52
check fix
mabaasit Dec 16, 2025
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
Prev Previous commit
Next Next commit
fix url for test and ensure aggregations have content
  • Loading branch information
mabaasit committed Dec 2, 2025
commit d5e2c8454ba1048a39adfa450a59c64df9c10ad5
14 changes: 12 additions & 2 deletions packages/compass-generative-ai/src/atlas-ai-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,20 @@ export class AtlasAiService {
this.logger = logger;
this.initPromise = this.setupAIAccess();

const initialBaseUrl = 'http://PLACEHOLDER_BASE_URL_TO_BE_REPLACED.invalid';
const model = createOpenAI({
apiKey: '',
baseURL: this.atlasService.assistantApiEndpoint(),
fetch: this.atlasService.authenticatedFetch.bind(this.atlasService),
baseURL: initialBaseUrl,
fetch: (url, init) => {
// The `baseUrl` can be dynamically changed, but `createOpenAI`
// doesn't allow us to change it after initial call. Instead
// we're going to update it every time the fetch call happens
const uri = String(url).replace(
initialBaseUrl,
this.atlasService.assistantApiEndpoint()
);
return this.atlasService.authenticatedFetch(uri, init);
},
// TODO(COMPASS-10125): Switch the model to `mongodb-slim-latest` when
// enabling this feature (to use edu-chatbot for GenAI).
}).responses('mongodb-chat-latest');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ export function parseXmlToMmsJsonResponse(xmlString: string, logger: Logger) {
// Keep the response same as we have from mms api
return {
content: {
aggregation: {
pipeline: result.aggregation,
},
...(result.aggregation ? { aggregation: result.aggregation } : {}),
query: {
filter: result.filter,
project: result.project,
Expand Down