Skip to content

Drop 'unknown' model fallbacks across AI integrations #25353

Open

Description

@andreiborza

When a request has no model, the AI integrations set gen_ai.request.model to 'unknown', and the span name becomes <operation> unknown. With span streaming the name drops the model, but the attribute stays.

If there is no model, do not set gen_ai.request.model. The span name is then only the operation (for example chat), with or without span streaming.

Affected integrations (in packages/server-utils/src):

  • OpenAI: ai/openai/index.ts, ai/openai/utils.ts, integrations/openai.ts
  • Anthropic: ai/anthropic-ai/index.ts
  • Google GenAI: ai/google-genai/index.ts, integrations/google-genai.ts
  • LangChain: ai/langchain/index.ts, ai/langchain/utils.ts, ai/langchain/embeddings.ts
  • Workers AI: ai/workers-ai/index.ts, ai/workers-ai/utils.ts

Raised in review: #25285 (comment)

Activity

  1. linear-code commented on Oct 14, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions