import { describe, expect, it } from 'vitest';
import { modelDisallowsSampling, providerModelIdDisallowsSampling, resolveTemperatureForModel, samplingParamProviderMessage, } from '../../ai/sampling.js';
describe('ai/sampling', () => {
    it('blocks sampling for catalog reasoning models', () => {
        expect(modelDisallowsSampling('claude-sonnet-4-6', { reasoning: true })).toBe(true);
        expect(modelDisallowsSampling('claude-sonnet-4-6', { reasoning: false })).toBe(false);
    });
    it('blocks sampling for Anthropic Opus 4.7+ wire ids', () => {
        expect(providerModelIdDisallowsSampling('claude-opus-4-7')).toBe(true);
        expect(providerModelIdDisallowsSampling('claude-opus-4-8')).toBe(true);
        expect(providerModelIdDisallowsSampling('claude-opus-4-6')).toBe(false);
    });
    it('blocks sampling for OpenAI o-series wire ids', () => {
        expect(providerModelIdDisallowsSampling('o3-mini')).toBe(true);
        expect(providerModelIdDisallowsSampling('gpt-4o')).toBe(false);
    });
    it('strips temperature when sampling is disallowed', () => {
        expect(resolveTemperatureForModel('claude-opus-4-8', { reasoning: true }, 0.3)).toBeUndefined();
        expect(resolveTemperatureForModel('claude-sonnet-4-6', { reasoning: false }, 0.3)).toBe(0.3);
    });
    it('maps provider temperature deprecation to an actionable message', () => {
        expect(samplingParamProviderMessage('temperature is deprecated for this model')).toContain('does not support temperature');
    });
});
//# sourceMappingURL=sampling.test.js.map