<?php

namespace XZD\AI\V5\AI\Providers;

use XZD\AI\V5\AI\OpenAICompatibleProvider;

class DeepSeekProvider extends OpenAICompatibleProvider
{
    public static function defaultBaseUrl(): string
    {
        return 'https://api.deepseek.com/v1';
    }

    public static function defaultModel(): string
    {
        return 'deepseek-v4-pro';
    }

    public function getProviderKey(): string
    {
        return 'deepseek';
    }

    /**
     * Enable DeepSeek Prompt Cache via X-DP-Cache header.
     *
     * @see https://api-docs.deepseek.com/guides/prompt_caching
     */
    protected function buildHeaders(): array
    {
        $headers = parent::buildHeaders();
        $headers['X-DP-Cache'] = '1';
        return $headers;
    }
}
