Skip to content

Commit d0106cd

Browse files
committed
remove ai21 model support
1 parent af39d1d commit d0106cd

File tree

2 files changed

+0
-109
lines changed

2 files changed

+0
-109
lines changed

plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/bedrock-runtime.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -205,19 +205,6 @@ export class BedrockRuntimeServiceExtension implements ServiceExtension {
205205
if (requestBody.stop_sequences !== undefined) {
206206
spanAttributes[ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.stop_sequences;
207207
}
208-
} else if (modelId.includes('ai21.jamba')) {
209-
if (requestBody.max_tokens !== undefined) {
210-
spanAttributes[ATTR_GEN_AI_REQUEST_MAX_TOKENS] = requestBody.max_tokens;
211-
}
212-
if (requestBody.temperature !== undefined) {
213-
spanAttributes[ATTR_GEN_AI_REQUEST_TEMPERATURE] = requestBody.temperature;
214-
}
215-
if (requestBody.top_p !== undefined) {
216-
spanAttributes[ATTR_GEN_AI_REQUEST_TOP_P] = requestBody.top_p;
217-
}
218-
if (requestBody.stop !== undefined) {
219-
spanAttributes[ATTR_GEN_AI_REQUEST_STOP_SEQUENCES] = requestBody.stop;
220-
}
221208
} else if (modelId.includes('mistral')) {
222209
if (requestBody.prompt !== undefined) {
223210
// NOTE: We approximate the token count since this value is not directly available in the body
@@ -366,18 +353,6 @@ export class BedrockRuntimeServiceExtension implements ServiceExtension {
366353
responseBody.generations[0].finish_reason,
367354
]);
368355
}
369-
} else if (currentModelId.includes('ai21.jamba')) {
370-
if (responseBody.usage?.prompt_tokens !== undefined) {
371-
span.setAttribute(ATTR_GEN_AI_USAGE_INPUT_TOKENS, responseBody.usage.prompt_tokens);
372-
}
373-
if (responseBody.usage?.completion_tokens !== undefined) {
374-
span.setAttribute(ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, responseBody.usage.completion_tokens);
375-
}
376-
if (responseBody.choices?.[0]?.finish_reason !== undefined) {
377-
span.setAttribute(ATTR_GEN_AI_RESPONSE_FINISH_REASONS, [
378-
responseBody.choices[0].finish_reason,
379-
]);
380-
}
381356
} else if (currentModelId.includes('mistral')) {
382357
if (responseBody.outputs?.[0]?.text !== undefined) {
383358
span.setAttribute(

plugins/node/opentelemetry-instrumentation-aws-sdk/test/mock-responses/bedrock-invokemodel-adds-ai21-jamba-model-attributes-to-span.json

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)