Skip to content

Conversation

@Kludex
Copy link
Member

@Kludex Kludex commented Nov 6, 2025

No description provided.

Comment on lines +278 to +282
const prepResult = await this.prepRequest()
if ('error' in prepResult) {
return prepResult
}
const { requestBodyText, requestBodyData, requestModel } = prepResult
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to cause any issue. I just put it up.

Comment on lines +98 to +114
const pathWithoutQuery = this.restOfPath.split('?')[0]
if (pathWithoutQuery === 'v1/messages') {
this.flavor = 'anthropic'
if (!('model' in requestBodyData)) {
return { error: 'model not found in Anthropic request body' }
}
const model = requestBodyData.model as string
this.requestModel = model

// Remove the model from the request body since Google Vertex doesn't expect it
delete requestBodyData.model

// Update requestBodyText without the model field
const updatedRequestBodyText = JSON.stringify(requestBodyData)

return { requestBodyText: updatedRequestBodyText, requestBodyData, requestModel: model }
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we okay with this level of intrusiveness?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants