modelmix 5.1.1 → 5.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/test/qwen.test.js CHANGED
@@ -61,6 +61,26 @@ describe('Qwen Model Registration Tests', () => {
61
61
  expect(model.models[0].key).to.equal('qwen/qwen3.8-max');
62
62
  });
63
63
 
64
+ it('should register Qwen 3.8 27B through OpenRouter', () => {
65
+ const model = ModelMix.new().qwen3827b();
66
+
67
+ expect(model.models).to.have.length(1);
68
+ expect(model.models[0].key).to.equal('qwen/qwen3.8-27b');
69
+ expect(model.models[0].provider).to.be.instanceOf(MixOpenRouter);
70
+ expect(ModelMix.calculateCost('qwen/qwen3.8-27b', {
71
+ input: 1_000_000,
72
+ cached: 250_000,
73
+ output: 1_000_000
74
+ })).to.equal(3.55);
75
+ });
76
+
77
+ it('should support Qwen 3.8 27B in chain()', () => {
78
+ const model = ModelMix.new().chain('qwen3827b');
79
+
80
+ expect(model.models).to.have.length(1);
81
+ expect(model.models[0].key).to.equal('qwen/qwen3.8-27b');
82
+ });
83
+
64
84
  it('should register Qwen 3.5 397B A17B through OpenRouter', () => {
65
85
  const model = ModelMix.new().qwen35397b();
66
86
 
@@ -576,6 +576,26 @@ describe('Token Usage Tracking', () => {
576
576
  }
577
577
  });
578
578
 
579
+ it('should register GPT-OSS 120B through the current OpenRouter model ID', function () {
580
+ const originalOpenRouterApiKey = process.env.OPENROUTER_API_KEY;
581
+ process.env.OPENROUTER_API_KEY = 'test-openrouter-key';
582
+
583
+ try {
584
+ const model = ModelMix.new().gptOss({
585
+ mix: { cerebras: false, groq: true, openrouter: true, together: false }
586
+ });
587
+
588
+ expect(model.models.map(({ key }) => key)).to.deep.equal([
589
+ 'openai/gpt-oss-120b',
590
+ 'openai/gpt-oss-120b'
591
+ ]);
592
+ expect(model.models[1].provider).to.be.instanceOf(MixOpenRouter);
593
+ } finally {
594
+ if (originalOpenRouterApiKey === undefined) delete process.env.OPENROUTER_API_KEY;
595
+ else process.env.OPENROUTER_API_KEY = originalOpenRouterApiKey;
596
+ }
597
+ });
598
+
579
599
  it('should use api-key header for MiMo provider', function () {
580
600
  const originalMimoApiKey = process.env.MIMO_API_KEY;
581
601
  process.env.MIMO_API_KEY = 'test-mimo-key';