# All files / src/providers/deepseek Capabilities.ts

58.33% Statements 14/24
70% Branches 7/10
100% Functions 12/12
56.52% Lines 13/23

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73

    2x

    2x
    1x

    2x
    1x

    2x

    3x
    3x

    1x

    1x

    1x

    3x

    3x

     import { ModelRegistry } from "../../models/ModelRegistry.js";
    import { PricingRegistry } from "../../models/PricingRegistry.js";
    import { ModelPricing } from "../../models/types.js";

    export class Capabilities {
      static getCapabilities(modelId: string): string[] {
        const caps = ["streaming"];

        if (/deepseek-chat/.test(modelId)) {
          caps.push("function_calling");
        }

        if (/deepseek-reasoner/.test(modelId)) {
          caps.push("reasoning");
        }

        return caps;
      }

      static getContextWindow(modelId: string): number | null {
        const val = ModelRegistry.getContextWindow(modelId, "deepseek");
        if (val) return val;

        Iif (/deepseek-(?:chat|reasoner)/.test(modelId)) {
          return 128_000;
        }
        return 32_768;
      }

      static getMaxOutputTokens(modelId: string): number | null {
        if (/deepseek-(?:chat|reasoner)/.test(modelId)) {
          return 8_192;
        }
        return 4_096;
      }

      static supportsVision(_modelId: string): boolean {
        return false;
      }

      static supportsTools(modelId: string): boolean {
        return /deepseek-chat/.test(modelId);
      }

      static supportsStructuredOutput(modelId: string): boolean {
        return /deepseek-(?:chat|reasoner)/.test(modelId);
      }

      static supportsEmbeddings(_modelId: string): boolean {
        return false;
      }

      static supportsImageGeneration(_modelId: string): boolean {
        return false;
      }

      static supportsTranscription(_modelId: string): boolean {
        return false;
      }

      static supportsModeration(_modelId: string): boolean {
        return false;
      }

      static supportsReasoning(modelId: string): boolean {
        return /deepseek-reasoner/.test(modelId);
      }

      static getPricing(modelId: string): ModelPricing | undefined {
        return PricingRegistry.getPricing(modelId, "deepseek");
      }
    }