@@ -15,6 +15,7 @@ import TabItem from '@theme/TabItem';
15
15
| Mistral | ` vertex_ai/mistral-* ` | [ Vertex AI - Mistral Models] ( https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/mistral ) |
16
16
| AI21 (Jamba) | ` vertex_ai/jamba-* ` | [ Vertex AI - AI21 Models] ( https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/ai21 ) |
17
17
| Qwen | ` vertex_ai/qwen/* ` | [ Vertex AI - Qwen Models] ( https://cloud.google.com/vertex-ai/generative-ai/docs/maas/qwen ) |
18
+ | OpenAI (GPT-OSS) | ` vertex_ai/openai/gpt-oss-* ` | [ Vertex AI - GPT-OSS Models] ( https://console.cloud.google.com/vertex-ai/publishers/openai/model-garden/ ) |
18
19
| Model Garden | ` vertex_ai/openai/{MODEL_ID} ` or ` vertex_ai/{MODEL_ID} ` | [ Vertex Model Garden] ( https://cloud.google.com/model-garden?hl=en ) |
19
20
20
21
## Vertex AI - Anthropic (Claude)
@@ -658,6 +659,141 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \
658
659
</Tabs >
659
660
660
661
662
+ ## VertexAI GPT-OSS Models
663
+
664
+ | Property | Details |
665
+ | ----------| ---------|
666
+ | Provider Route | ` vertex_ai/openai/{MODEL} ` |
667
+ | Vertex Documentation | [ Vertex AI - GPT-OSS Models] ( https://console.cloud.google.com/vertex-ai/publishers/openai/model-garden/ ) |
668
+
669
+ ** LiteLLM Supports all Vertex AI GPT-OSS Models.** Ensure you use the ` vertex_ai/openai/ ` prefix for all Vertex AI GPT-OSS models.
670
+
671
+ | Model Name | Usage |
672
+ | ------------------| ------------------------------|
673
+ | vertex_ai/openai/gpt-oss-20b-maas | ` completion('vertex_ai/openai/gpt-oss-20b-maas', messages) ` |
674
+
675
+ #### Usage
676
+
677
+ <Tabs >
678
+ <TabItem value =" sdk " label =" SDK " >
679
+
680
+ ``` python
681
+ from litellm import completion
682
+ import os
683
+
684
+ os.environ[" GOOGLE_APPLICATION_CREDENTIALS" ] = " "
685
+
686
+ model = " openai/gpt-oss-20b-maas"
687
+
688
+ vertex_ai_project = " your-vertex-project" # can also set this as os.environ["VERTEXAI_PROJECT"]
689
+ vertex_ai_location = " your-vertex-location" # can also set this as os.environ["VERTEXAI_LOCATION"]
690
+
691
+ response = completion(
692
+ model = " vertex_ai/" + model,
693
+ messages = [{" role" : " user" , " content" : " hi" }],
694
+ vertex_ai_project = vertex_ai_project,
695
+ vertex_ai_location = vertex_ai_location,
696
+ )
697
+ print (" \n Model Response" , response)
698
+ ```
699
+ </TabItem >
700
+ <TabItem value =" proxy " label =" Proxy " >
701
+
702
+ ** 1. Add to config**
703
+
704
+ ``` yaml
705
+ model_list :
706
+ - model_name : gpt-oss
707
+ litellm_params :
708
+ model : vertex_ai/openai/gpt-oss-20b-maas
709
+ vertex_ai_project : " my-test-project"
710
+ vertex_ai_location : " us-central1"
711
+ ` ` `
712
+
713
+ **2. Start proxy**
714
+
715
+ ` ` ` bash
716
+ litellm --config /path/to/config.yaml
717
+
718
+ # RUNNING at http://0.0.0.0:4000
719
+ ```
720
+
721
+ ** 3. Test it!**
722
+
723
+ ``` bash
724
+ curl --location ' http://0.0.0.0:4000/chat/completions' \
725
+ --header ' Authorization: Bearer sk-1234' \
726
+ --header ' Content-Type: application/json' \
727
+ --data ' {
728
+ "model": "gpt-oss", # 👈 the ' model_name' in config
729
+ "messages": [
730
+ {
731
+ "role": "user",
732
+ "content": "what llm are you"
733
+ }
734
+ ],
735
+ }'
736
+ ```
737
+
738
+ </TabItem >
739
+ </Tabs >
740
+
741
+ #### Usage - ` reasoning_effort `
742
+
743
+ GPT-OSS models support the ` reasoning_effort ` parameter for enhanced reasoning capabilities.
744
+
745
+ <Tabs >
746
+ <TabItem value =" sdk " label =" SDK " >
747
+
748
+ ``` python
749
+ from litellm import completion
750
+
751
+ response = completion(
752
+ model = " vertex_ai/openai/gpt-oss-20b-maas" ,
753
+ messages = [{" role" : " user" , " content" : " Solve this complex problem step by step" }],
754
+ reasoning_effort = " low" , # Options: "minimal", "low", "medium", "high"
755
+ vertex_ai_project = " your-vertex-project" ,
756
+ vertex_ai_location = " us-central1" ,
757
+ )
758
+ ```
759
+
760
+ </TabItem >
761
+
762
+ <TabItem value =" proxy " label =" PROXY " >
763
+
764
+ 1 . Setup config.yaml
765
+
766
+ ``` yaml
767
+ model_list :
768
+ - model_name : gpt-oss
769
+ litellm_params :
770
+ model : vertex_ai/openai/gpt-oss-20b-maas
771
+ vertex_ai_project : " my-test-project"
772
+ vertex_ai_location : " us-central1"
773
+ ` ` `
774
+
775
+ 2. Start proxy
776
+
777
+ ` ` ` bash
778
+ litellm --config /path/to/config.yaml
779
+ ```
780
+
781
+ 3 . Test it!
782
+
783
+ ``` bash
784
+ curl http://0.0.0.0:4000/v1/chat/completions \
785
+ -H " Content-Type: application/json" \
786
+ -H " Authorization: Bearer <YOUR-LITELLM-KEY>" \
787
+ -d ' {
788
+ "model": "gpt-oss",
789
+ "messages": [{"role": "user", "content": "Solve this complex problem step by step"}],
790
+ "reasoning_effort": "low"
791
+ }'
792
+ ```
793
+
794
+ </TabItem >
795
+ </Tabs >
796
+
661
797
## Model Garden
662
798
663
799
::: tip
0 commit comments