@tokenlabai/mcp-server 0.4.2 → 0.6.0

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.
@@ -117,6 +117,34 @@
117
117
  "stream": true
118
118
  }
119
119
  },
120
+ "live_translation": {
121
+ "summary": "Stream audio translation",
122
+ "value": {
123
+ "model": "qwen3-livetranslate-flash",
124
+ "messages": [
125
+ {
126
+ "role": "user",
127
+ "content": [
128
+ {
129
+ "type": "input_audio",
130
+ "input_audio": {
131
+ "data": "https://example.com/sample.wav",
132
+ "format": "wav"
133
+ }
134
+ }
135
+ ]
136
+ }
137
+ ],
138
+ "translation_options": {
139
+ "source_lang": "zh",
140
+ "target_lang": "en"
141
+ },
142
+ "modalities": [
143
+ "text"
144
+ ],
145
+ "stream": true
146
+ }
147
+ },
120
148
  "function_calling": {
121
149
  "summary": "Function calling",
122
150
  "value": {
@@ -1569,22 +1597,111 @@
1569
1597
  "Models"
1570
1598
  ],
1571
1599
  "summary": "List models",
1572
- "description": "Lists the currently available models. Default responses are trimmed for discovery. Non-chat models may include lightweight request-format metadata; `agent_preferences` appears only when `recommended_for` is present. Deprecated `lemondata` is still returned as a compatibility alias during the migration.",
1600
+ "description": "Lists the currently available models. Use `view=compact` for model selection and `view=full` for the existing OpenAI-compatible discovery shape. Native API calls default to `full`; integrations may choose `compact` as their default. Non-chat recommendations are available through `recommended_for`.",
1573
1601
  "operationId": "listModels",
1602
+ "parameters": [
1603
+ {
1604
+ "name": "provider",
1605
+ "in": "query",
1606
+ "required": false,
1607
+ "description": "Filter by public model provider, for example openai, anthropic, google, or minimax.",
1608
+ "schema": {
1609
+ "type": "string"
1610
+ }
1611
+ },
1612
+ {
1613
+ "name": "tag",
1614
+ "in": "query",
1615
+ "required": false,
1616
+ "description": "Filter by a public capability tag.",
1617
+ "schema": {
1618
+ "type": "string"
1619
+ }
1620
+ },
1621
+ {
1622
+ "name": "category",
1623
+ "in": "query",
1624
+ "required": false,
1625
+ "description": "Filter by model category.",
1626
+ "schema": {
1627
+ "type": "string",
1628
+ "enum": [
1629
+ "chat",
1630
+ "embedding",
1631
+ "translation",
1632
+ "image",
1633
+ "video",
1634
+ "audio",
1635
+ "tts",
1636
+ "stt",
1637
+ "rerank",
1638
+ "3d",
1639
+ "music"
1640
+ ]
1641
+ }
1642
+ },
1643
+ {
1644
+ "name": "recommended_for",
1645
+ "in": "query",
1646
+ "required": false,
1647
+ "description": "Sort supported non-chat models for a task category and include recommendation evidence.",
1648
+ "schema": {
1649
+ "type": "string",
1650
+ "enum": [
1651
+ "image",
1652
+ "video",
1653
+ "music",
1654
+ "3d",
1655
+ "tts",
1656
+ "stt",
1657
+ "embedding",
1658
+ "rerank",
1659
+ "translation"
1660
+ ]
1661
+ }
1662
+ },
1663
+ {
1664
+ "name": "view",
1665
+ "in": "query",
1666
+ "required": false,
1667
+ "description": "Choose compact model-selection fields or the full OpenAI-compatible list shape.",
1668
+ "schema": {
1669
+ "type": "string",
1670
+ "enum": [
1671
+ "compact",
1672
+ "full"
1673
+ ],
1674
+ "default": "full"
1675
+ }
1676
+ }
1677
+ ],
1574
1678
  "responses": {
1575
1679
  "200": {
1576
1680
  "description": "List of models",
1577
1681
  "content": {
1578
1682
  "application/json": {
1579
1683
  "schema": {
1580
- "$ref": "#/components/schemas/ModelsResponse"
1684
+ "oneOf": [
1685
+ {
1686
+ "$ref": "#/components/schemas/ModelsResponse"
1687
+ },
1688
+ {
1689
+ "$ref": "#/components/schemas/CompactModelsResponse"
1690
+ }
1691
+ ]
1581
1692
  }
1582
1693
  }
1583
1694
  }
1584
1695
  },
1696
+ "400": {
1697
+ "$ref": "#/components/responses/BadRequest"
1698
+ },
1585
1699
  "401": {
1586
1700
  "$ref": "#/components/responses/Unauthorized"
1587
1701
  },
1702
+ "429": {
1703
+ "$ref": "#/components/responses/RateLimitExceeded"
1704
+ },
1588
1705
  "500": {
1589
1706
  "$ref": "#/components/responses/ServerError"
1590
1707
  }
@@ -6520,7 +6637,7 @@
6520
6637
  },
6521
6638
  "top_k": {
6522
6639
  "type": "integer",
6523
- "minimum": 1,
6640
+ "minimum": 0,
6524
6641
  "description": "Top-k sampling cutoff for compatible providers."
6525
6642
  },
6526
6643
  "logit_bias": {
@@ -6542,6 +6659,35 @@
6542
6659
  "additionalProperties": true,
6543
6660
  "description": "Audio output configuration when requesting audio modality."
6544
6661
  },
6662
+ "translation_options": {
6663
+ "type": "object",
6664
+ "required": [
6665
+ "target_lang"
6666
+ ],
6667
+ "properties": {
6668
+ "source_lang": {
6669
+ "type": "string",
6670
+ "description": "Source language code. Omit when the model supports automatic detection."
6671
+ },
6672
+ "target_lang": {
6673
+ "type": "string",
6674
+ "description": "Target language code."
6675
+ }
6676
+ },
6677
+ "description": "Language settings for models that translate audio or video through Chat Completions."
6678
+ },
6679
+ "speech_rate": {
6680
+ "type": "number",
6681
+ "minimum": 0.5,
6682
+ "maximum": 2,
6683
+ "description": "Speech rate for compatible translated audio output."
6684
+ },
6685
+ "repetition_penalty": {
6686
+ "type": "number",
6687
+ "minimum": 0,
6688
+ "exclusiveMinimum": true,
6689
+ "description": "Repetition penalty for compatible models."
6690
+ },
6545
6691
  "prediction": {
6546
6692
  "type": "object",
6547
6693
  "additionalProperties": true,
@@ -6634,6 +6780,62 @@
6634
6780
  "type",
6635
6781
  "image_url"
6636
6782
  ]
6783
+ },
6784
+ {
6785
+ "type": "object",
6786
+ "properties": {
6787
+ "type": {
6788
+ "type": "string",
6789
+ "enum": [
6790
+ "video_url"
6791
+ ]
6792
+ },
6793
+ "video_url": {
6794
+ "type": "object",
6795
+ "properties": {
6796
+ "url": {
6797
+ "type": "string"
6798
+ }
6799
+ },
6800
+ "required": [
6801
+ "url"
6802
+ ]
6803
+ }
6804
+ },
6805
+ "required": [
6806
+ "type",
6807
+ "video_url"
6808
+ ]
6809
+ },
6810
+ {
6811
+ "type": "object",
6812
+ "properties": {
6813
+ "type": {
6814
+ "type": "string",
6815
+ "enum": [
6816
+ "input_audio"
6817
+ ]
6818
+ },
6819
+ "input_audio": {
6820
+ "type": "object",
6821
+ "properties": {
6822
+ "data": {
6823
+ "type": "string",
6824
+ "description": "Public audio URL or Base64 data URL."
6825
+ },
6826
+ "format": {
6827
+ "type": "string"
6828
+ }
6829
+ },
6830
+ "required": [
6831
+ "data"
6832
+ ]
6833
+ }
6834
+ },
6835
+ "required": [
6836
+ "type",
6837
+ "input_audio"
6838
+ ]
6637
6839
  }
6638
6840
  ]
6639
6841
  }
@@ -8243,7 +8445,180 @@
8243
8445
  "required": [
8244
8446
  "object",
8245
8447
  "data"
8246
- ]
8448
+ ],
8449
+ "additionalProperties": false
8450
+ },
8451
+ "CompactModelsResponse": {
8452
+ "type": "object",
8453
+ "description": "Compact model-selection response used by TokenLab MCP and other agent integrations.",
8454
+ "properties": {
8455
+ "object": {
8456
+ "type": "string",
8457
+ "enum": [
8458
+ "list"
8459
+ ]
8460
+ },
8461
+ "view": {
8462
+ "type": "string",
8463
+ "enum": [
8464
+ "compact"
8465
+ ]
8466
+ },
8467
+ "count": {
8468
+ "type": "integer",
8469
+ "minimum": 0
8470
+ },
8471
+ "data": {
8472
+ "type": "array",
8473
+ "items": {
8474
+ "$ref": "#/components/schemas/CompactModelListItem"
8475
+ }
8476
+ }
8477
+ },
8478
+ "required": [
8479
+ "object",
8480
+ "view",
8481
+ "count",
8482
+ "data"
8483
+ ],
8484
+ "additionalProperties": false
8485
+ },
8486
+ "CompactModelListItem": {
8487
+ "type": "object",
8488
+ "description": "Fields needed to shortlist a model before calling get_model or get_model_pricing.",
8489
+ "properties": {
8490
+ "id": {
8491
+ "type": "string",
8492
+ "description": "Model identifier"
8493
+ },
8494
+ "provider": {
8495
+ "type": "string",
8496
+ "description": "Public model provider"
8497
+ },
8498
+ "category": {
8499
+ "type": "string"
8500
+ },
8501
+ "capabilities": {
8502
+ "type": "array",
8503
+ "items": {
8504
+ "type": "string"
8505
+ }
8506
+ },
8507
+ "max_input_tokens": {
8508
+ "type": [
8509
+ "number",
8510
+ "null"
8511
+ ]
8512
+ },
8513
+ "max_output_tokens": {
8514
+ "type": [
8515
+ "number",
8516
+ "null"
8517
+ ]
8518
+ },
8519
+ "pricing": {
8520
+ "type": "object",
8521
+ "properties": {
8522
+ "unit": {
8523
+ "type": "string"
8524
+ },
8525
+ "currency": {
8526
+ "type": "string",
8527
+ "enum": [
8528
+ "USD"
8529
+ ]
8530
+ },
8531
+ "input_per_1m": {
8532
+ "type": "string"
8533
+ },
8534
+ "output_per_1m": {
8535
+ "type": "string"
8536
+ },
8537
+ "per_request": {
8538
+ "type": "string"
8539
+ },
8540
+ "min_price": {
8541
+ "type": "string",
8542
+ "description": "Minimum TokenLab price for a structured pricing model."
8543
+ },
8544
+ "max_price": {
8545
+ "type": "string",
8546
+ "description": "Maximum TokenLab price for a structured pricing model."
8547
+ },
8548
+ "has_complex_pricing": {
8549
+ "type": "boolean"
8550
+ }
8551
+ },
8552
+ "required": [
8553
+ "unit",
8554
+ "currency",
8555
+ "has_complex_pricing"
8556
+ ],
8557
+ "additionalProperties": false
8558
+ },
8559
+ "status": {
8560
+ "type": "string",
8561
+ "description": "Public model lifecycle stage."
8562
+ },
8563
+ "latest": {
8564
+ "type": "boolean"
8565
+ },
8566
+ "supported_operations": {
8567
+ "type": "array",
8568
+ "items": {
8569
+ "type": "string"
8570
+ }
8571
+ },
8572
+ "request_endpoint": {
8573
+ "type": "string"
8574
+ },
8575
+ "recommendation": {
8576
+ "type": "object",
8577
+ "properties": {
8578
+ "preferred_rank": {
8579
+ "type": [
8580
+ "number",
8581
+ "null"
8582
+ ]
8583
+ },
8584
+ "success_rate_24h": {
8585
+ "type": [
8586
+ "number",
8587
+ "null"
8588
+ ]
8589
+ },
8590
+ "sample_count_24h": {
8591
+ "type": "integer"
8592
+ },
8593
+ "status": {
8594
+ "type": "string",
8595
+ "enum": [
8596
+ "ready",
8597
+ "insufficient_samples"
8598
+ ]
8599
+ }
8600
+ },
8601
+ "required": [
8602
+ "preferred_rank",
8603
+ "success_rate_24h",
8604
+ "sample_count_24h",
8605
+ "status"
8606
+ ],
8607
+ "additionalProperties": false
8608
+ }
8609
+ },
8610
+ "required": [
8611
+ "id",
8612
+ "provider",
8613
+ "category",
8614
+ "capabilities",
8615
+ "max_input_tokens",
8616
+ "max_output_tokens",
8617
+ "pricing",
8618
+ "status",
8619
+ "latest"
8620
+ ],
8621
+ "additionalProperties": false
8247
8622
  },
8248
8623
  "Model": {
8249
8624
  "type": "object",
@@ -8270,15 +8645,6 @@
8270
8645
  },
8271
8646
  "tokenlab": {
8272
8647
  "$ref": "#/components/schemas/ModelTokenLabExtension"
8273
- },
8274
- "lemondata": {
8275
- "allOf": [
8276
- {
8277
- "$ref": "#/components/schemas/ModelLemondataExtension"
8278
- }
8279
- ],
8280
- "deprecated": true,
8281
- "description": "Deprecated alias for tokenlab. Retained for compatibility during the TokenLab migration."
8282
8648
  }
8283
8649
  },
8284
8650
  "required": [
@@ -9744,87 +10110,6 @@
9744
10110
  }
9745
10111
  }
9746
10112
  },
9747
- "ModelListLemondataExtension": {
9748
- "type": "object",
9749
- "description": "TokenLab discovery fields for the list route. Detail-only metadata such as capability flags, pricing provenance, full model details, and empty recommendation snapshots are omitted.",
9750
- "properties": {
9751
- "aliases": {
9752
- "type": "array",
9753
- "items": {
9754
- "type": "string"
9755
- }
9756
- },
9757
- "pricing": {
9758
- "type": "object",
9759
- "additionalProperties": true
9760
- },
9761
- "capabilities": {
9762
- "type": "array",
9763
- "items": {
9764
- "type": "string"
9765
- }
9766
- },
9767
- "providers": {
9768
- "type": "array",
9769
- "items": {
9770
- "type": "string"
9771
- }
9772
- },
9773
- "max_input_tokens": {
9774
- "type": [
9775
- "number",
9776
- "null"
9777
- ]
9778
- },
9779
- "max_output_tokens": {
9780
- "type": [
9781
- "number",
9782
- "null"
9783
- ]
9784
- },
9785
- "category": {
9786
- "type": "string"
9787
- },
9788
- "pricing_unit": {
9789
- "type": "string"
9790
- },
9791
- "cache_pricing": {
9792
- "type": [
9793
- "object",
9794
- "null"
9795
- ],
9796
- "additionalProperties": true
9797
- },
9798
- "has_complex_pricing": {
9799
- "type": "boolean"
9800
- },
9801
- "pricing_summary": {
9802
- "type": [
9803
- "object",
9804
- "null"
9805
- ],
9806
- "additionalProperties": true
9807
- },
9808
- "agent_preferences": {
9809
- "type": "object",
9810
- "additionalProperties": true
9811
- },
9812
- "request_format_summary": {
9813
- "$ref": "#/components/schemas/ModelListRequestFormatSummary"
9814
- }
9815
- },
9816
- "required": [
9817
- "aliases",
9818
- "pricing",
9819
- "capabilities",
9820
- "max_input_tokens",
9821
- "max_output_tokens",
9822
- "category",
9823
- "pricing_unit",
9824
- "has_complex_pricing"
9825
- ],
9826
- "additionalProperties": false
9827
- },
9828
10113
  "ModelListItem": {
9829
10114
  "type": "object",
9830
10115
  "properties": {
@@ -9848,15 +10133,6 @@
9848
10133
  "description": "Model provider",
9849
10134
  "example": "openai"
9850
10135
  },
9851
- "lemondata": {
9852
- "allOf": [
9853
- {
9854
- "$ref": "#/components/schemas/ModelListLemondataExtension"
9855
- }
9856
- ],
9857
- "deprecated": true,
9858
- "description": "Deprecated alias for tokenlab. Retained for compatibility during the TokenLab migration."
9859
- },
9860
10136
  "tokenlab": {
9861
10137
  "$ref": "#/components/schemas/ModelListTokenLabExtension"
9862
10138
  }
@@ -9870,89 +10146,6 @@
9870
10146
  ],
9871
10147
  "additionalProperties": false
9872
10148
  },
9873
- "ModelLemondataExtension": {
9874
- "type": "object",
9875
- "description": "TokenLab extension fields for the detail route, including pricing, capabilities, recommendation metadata, and detailed non-chat request metadata.",
9876
- "properties": {
9877
- "aliases": {
9878
- "type": "array",
9879
- "items": {
9880
- "type": "string"
9881
- }
9882
- },
9883
- "pricing": {
9884
- "type": "object",
9885
- "additionalProperties": true
9886
- },
9887
- "capabilities": {
9888
- "type": "array",
9889
- "items": {
9890
- "type": "string"
9891
- }
9892
- },
9893
- "providers": {
9894
- "type": "array",
9895
- "items": {
9896
- "type": "string"
9897
- }
9898
- },
9899
- "max_input_tokens": {
9900
- "type": [
9901
- "number",
9902
- "null"
9903
- ]
9904
- },
9905
- "max_output_tokens": {
9906
- "type": [
9907
- "number",
9908
- "null"
9909
- ]
9910
- },
9911
- "category": {
9912
- "type": "string"
9913
- },
9914
- "pricing_unit": {
9915
- "type": "string"
9916
- },
9917
- "cache_pricing": {
9918
- "type": [
9919
- "object",
9920
- "null"
9921
- ],
9922
- "additionalProperties": true
9923
- },
9924
- "has_complex_pricing": {
9925
- "type": "boolean"
9926
- },
9927
- "supported_operations": {
9928
- "type": "array",
9929
- "items": {
9930
- "type": "string"
9931
- }
9932
- },
9933
- "pricing_summary": {
9934
- "type": [
9935
- "object",
9936
- "null"
9937
- ],
9938
- "additionalProperties": true
9939
- },
9940
- "pricing_provenance": {
9941
- "type": [
9942
- "object",
9943
- "null"
9944
- ],
9945
- "additionalProperties": true
9946
- },
9947
- "request_format_summary": {
9948
- "$ref": "#/components/schemas/NonChatRequestFormatSummary"
9949
- },
9950
- "request_format_details": {
9951
- "$ref": "#/components/schemas/NonChatRequestFormatDetails"
9952
- }
9953
- },
9954
- "additionalProperties": true
9955
- },
9956
10149
  "ModelPricingResponse": {
9957
10150
  "type": "object",
9958
10151
  "properties": {