<<< return to main page
[TOC] * have an **old** version of SillyTavern? * heard about **new** GPT, Claude, Gemini (...etc) models available in latest SillyTavern? * do not feel like updating because your current setup just works? * still *want* to test those new models? fret not, you can add new models to your current SillyTavern version without upgrading # tl;dr 1) find up **API name of the model** in developer docs, or ask anons around API names look like: `gemini-1.5-pro-exp-0827`, `claude-3-5-sonnet-20241022`, `chatgpt-4o-latest` 2) open SillyTavern folder -> folder `public` -> open file `index.html` in any text editor 3) search within `index.html` for: * **model_claude_select** for Claude * **model_google_select** for Gemini * **model_openai_select** for GPT 4) add a new `<option>` inside `<optgroup>` with required model. for example ```html <option value="claude-3-5-sonnet-20241022">new Claude 3-5 from October</option> ``` 5) save `index.html`, reload tab with SillyTavern # explanation ## model API name first thing first - you must learn the correct name of a new model. it isn't always its "marketing" label; you need **its inner API name**. API name is internal name of the model. for instance, "Claude Sonnet" might sound simple enough, but its API is `claude-3-sonnet-20240229` those inner API names help when *there are several versions of similar models*. take "Gemini Pro" for example. there are four versions currently (as of october 2024): * `gemini-1.5-pro-001` * `gemini-1.5-pro-002` * plus one experimental, `gemini-1.5-pro-exp-0827` * and previous "1.0" version, `gemini-1.0-pro` this means the title "Gemini Pro" could mean any of these versions. *knowing exact API names ensures you choose model correctly* where do you get these API names? in the documentation, of course! * the list of [Claude models](https://docs.anthropic.com/en/docs/about-claude/models) * the list of [Gemini models](https://ai.google.dev/gemini-api/docs/models/gemini) * the list of [OpenAI models](https://platform.openai.com/docs/models) so let's say that you have an outdated SillyTavern 1.11.6 that has no support for a **"new Claude 3-5 model"**. open [Claude documentation](https://docs.anthropic.com/en/docs/about-claude/models) and look thru available models and **find its API name**, the correct API name for "new Claude 3-5 model" is `claude-3-5-sonnet-20241022` ![image failed to load](./img/g_ST_add_model/Claude_API_name.png) ## index.html after you learned API name of new model, you must **check SillyTavern files** * open SillyTavern folder -> folder `public` -> open file `index.html` in any text editor (it is very recommended to use advanced text editor like [notepad++](https://notepad-plus-plus.org/downloads/) instead of regular notepad) inside look for `model_openai_select`. you will find code similar to this (*varies between SillyTavern versions*): ![image failed to load](./img/g_ST_add_model/index_overview.png) take note of this part: ```html <optgroup label="GPT-3.5 Turbo"> <option value="gpt-3.5-turbo">gpt-3.5-turbo</option> <option value="gpt-3.5-turbo-0125">gpt-3.5-turbo-0125 (2024)</option> <option value="gpt-3.5-turbo-1106">gpt-3.5-turbo-1106 (2023)</option> <option value="gpt-3.5-turbo-0613">gpt-3.5-turbo-0613 (2023)</option> <option value="gpt-3.5-turbo-0301">gpt-3.5-turbo-0301 (2023)</option> <option value="gpt-3.5-turbo-16k">gpt-3.5-turbo-16k</option> <option value="gpt-3.5-turbo-16k-0613">gpt-3.5-turbo-16k-0613 (2023)</option> </optgroup> ``` now, let's add extra line to the bottom: ```html <optgroup label="GPT-3.5 Turbo"> <option value="gpt-3.5-turbo">gpt-3.5-turbo</option> <option value="gpt-3.5-turbo-0125">gpt-3.5-turbo-0125 (2024)</option> <option value="gpt-3.5-turbo-1106">gpt-3.5-turbo-1106 (2023)</option> <option value="gpt-3.5-turbo-0613">gpt-3.5-turbo-0613 (2023)</option> <option value="gpt-3.5-turbo-0301">gpt-3.5-turbo-0301 (2023)</option> <option value="gpt-3.5-turbo-16k">gpt-3.5-turbo-16k</option> <option value="gpt-3.5-turbo-16k-0613">gpt-3.5-turbo-16k-0613 (2023)</option> <option value="gpt-newversion">new GPT release</option> </optgroup> ``` save your changes, reload SillyTavern, and check for GPT (OpenAI) models. you should see the new model we just added: ![image failed to load](./img/g_ST_add_model/index_overview_new.png) and *THAT* is how you add new models to older versions of SillyTavern. all you need to do is add an `option` into any existing `optgroup` in `index.html` file the structure of `option` is simple: ```html <option value="MODEL API NAME">NAME TO DISPLAY</option> ``` - **MODEL API NAME**: model's actual API name from the documentation - **NAME TO DISPLAY**: any name you want SillyTavern to show you for this model (like any label you want) the lists of available models are stored under the following IDs in `index.html`: * `model_claude_select` - available Claude models * `model_google_select` - available Gemini models * `model_openai_select` - available GPT models # adding new model in old SillyTavern ## adding a new Claude model to add a new Claude model in old SillyTavern do the following: 1) learn new model's API name from [Claude docs](https://docs.anthropic.com/en/docs/about-claude/models) (eg `claude-3-5-sonnet-20241022`) 2) open SillyTavern folder -> open folder `public` -> open file `index.html` in any text editor 3) look for `model_claude_select` 4) add a new `<option>` in current `<optgroup>`. order doesn't matter. for example: ```html <option value="claude-3-5-sonnet-20241022">NEW Claude 3-5 (OCT 2024)</option> <option value="claude-3-5-sonnet-latest">claude-3-5-sonnet-latest</option> <option value="claude-3-5-sonnet-20240620">claude-3-5-sonnet-20240620</option> <option value="claude-3-opus-20240229">claude-3-opus-20240229</option> <option value="claude-3-sonnet-20240229">claude-3-sonnet-20240229</option> <option value="claude-3-haiku-20240307">claude-3-haiku-20240307</option> ``` 5) save, reload SillyTavern tab ## adding a new Gemini model to add a new Gemini model in old SillyTavern do the following: 1) learn new model's API name from [Gemini docs](https://ai.google.dev/gemini-api/docs/models/gemini) (eg `gemini-1.5-pro-002`) 2) open SillyTavern folder -> open folder `public` -> open file `index.html` in any text editor 3) look for `model_google_select` 4) add a new `<option>` in current `<optgroup>`. order doesn't matter. for example: ```html <option value="gemini-1.5-pro-002">NEW Gemini 1.5 Pro (SEP 2024)</option> <option value="gemini-1.5-pro-exp-0801">Gemini 1.5 Pro Experiment 2024-08-01</option> <option value="gemini-1.5-pro-latest">Gemini 1.5 Pro</option> <option value="gemini-1.5-pro-001">Gemini 1.5 Pro</option> <option value="gemini-1.5-flash-8b">Gemini 1.5 Flash 8B</option> ``` 5) save, reload SillyTavern tab ## adding a new GPT model to add a new GPT model in old SillyTavern do the following: 1) learn new model's API name from [OpenAI docs](https://platform.openai.com/docs/models) (eg `chatgpt-4o-latest`) 2) open SillyTavern folder -> open folder `public` -> open file `index.html` in any text editor 3) look for `model_openai_select` 4) add a new `<option>` in current `<optgroup>`. order doesn't matter. for example: ```html <option value="chatgpt-4o-latest">NEW ChatGPT</option> <option value="gpt-4">gpt-4</option> <option value="gpt-4-0613">gpt-4-0613 (2023)</option> <option value="gpt-4-0314">gpt-4-0314 (2023)</option> <option value="gpt-4-32k">gpt-4-32k</option> <option value="gpt-4-32k-0613">gpt-4-32k-0613 (2023)</option> <option value="gpt-4-32k-0314">gpt-4-32k-0314 (2023)</option> ``` 5) save, reload SillyTavern tab # extras ## editing optgroup you can edit `<optgroup>` sections to better organize your models. for instance, this is how Gemini models look in SillyTavern v1.12.7: ```html <optgroup label="Primary"> <option value="gemini-1.5-pro">Gemini 1.5 Pro</option> <option value="gemini-1.5-flash">Gemini 1.5 Flash</option> <option value="gemini-1.0-pro">Gemini 1.0 Pro</option> <option value="gemini-pro">Gemini Pro (1.0)</option> <option value="gemini-pro-vision">Gemini Pro Vision (1.0)</option> <option value="gemini-ultra">Gemini Ultra (1.0)</option> <option value="gemini-1.0-ultra-latest">Gemini 1.0 Ultra</option> <option value="text-bison-001">PaLM 2 (Legacy)</option> <option value="chat-bison-001">PaLM 2 Chat (Legacy)</option> </optgroup> <optgroup label="Subversions"> <option value="gemini-1.5-pro-exp-0801">Gemini 1.5 Pro Experiment 2024-08-01</option> <option value="gemini-1.5-pro-exp-0827">Gemini 1.5 Pro Experiment 2024-08-27</option> <option value="gemini-1.5-pro-latest">Gemini 1.5 Pro [latest]</option> <option value="gemini-1.5-pro-001">Gemini 1.5 Pro [001]</option> <option value="gemini-1.5-pro-002">Gemini 1.5 Pro [002]</option> <option value="gemini-1.5-flash-8b">Gemini 1.5 Flash 8B</option> <option value="gemini-1.5-flash-exp-0827">Gemini 1.5 Flash Experiment 2024-08-27</option> <option value="gemini-1.5-flash-8b-exp-0827">Gemini 1.5 Flash 8B Experiment 2024-08-27</option> <option value="gemini-1.5-flash-8b-exp-0924">Gemini 1.5 Flash 8B Experiment 2024-09-24</option> <option value="gemini-1.5-flash-latest">Gemini 1.5 Flash [latest]</option> <option value="gemini-1.5-flash-001">Gemini 1.5 Flash [001]</option> <option value="gemini-1.5-flash-002">Gemini 1.5 Flash [002]</option> <option value="gemini-1.0-pro-latest">Gemini 1.0 Pro [latest]</option> <option value="gemini-1.0-pro-001">Gemini 1.0 Pro (Tuning) [001]</option> <option value="gemini-1.0-pro-vision-latest">Gemini 1.0 Pro Vision [latest]</option> </optgroup> ``` {{{S-inline-highlight-red that is a bucking mess! /S}}} you may clean it up in the way you want: ```html <optgroup label="Gemini Pro"> <option value="gemini-1.5-pro-001">Gemini 1.5 Pro 001</option> <option value="gemini-1.5-pro-002">Gemini 1.5 Pro 002</option> <option value="gemini-1.5-pro-exp-0801">Gemini 1.5 EXP 0801</option> <option value="gemini-1.5-pro-exp-0827">Gemini 1.5 EXP 0827</option> <option value="gemini-1.0-pro">Gemini 1.0 Pro</option> </optgroup> <optgroup label="Gemini Flash"> <option value="gemini-1.5-flash-001">Gemini 1.5 Flash 001</option> <option value="gemini-1.5-flash-002">Gemini 1.5 Flash 002</option> <option value="gemini-1.5-flash-exp-0827">Gemini 1.5 Flash EXP 0827</option> <option value="gemini-1.5-flash-8b">Gemini 1.5 Flash 8B</option> <option value="gemini-1.5-flash-8b-exp-0827">Gemini 1.5 Flash 8B EXP 0827</option> <option value="gemini-1.5-flash-8b-exp-0924">Gemini 1.5 Flash 8B EXP 0924</option> </optgroup> ``` this setup looks much better, making everything easier to find ## new features keep in mind that just adding models **does not bring their new features!** some models may have *different tokenizers* (e.g., GPT-4o models have different tokenization vs. GPT-4 Turbo) or *lack certain parameters* (OpenAI's o1 model does not use temperature or top_p) to make full use of these new features, you must either update SillyTavern, or manually add required compatibility into old SillyTavern ## don't rush if the model just launched (within hours), you might want **to wait** before adding it to SillyTavern. developers could have issues that need fixing first when Claude Sonnet 3.5 launched, Anthropic initially listed its API wrong: `claude-3.5-sonnet-20240620` instead of `claude-3-5-sonnet-20240620`. users could not use a new model for a few hours until this was fixed. moreso developers might route the wrong name to the wrong model. it is wildly assumed that OpenAI at the release linked `gpt-4-turbo-2024-04-09` model to the previous Turbo version from `2024-01-25`, so anons were using the wrong model until OpenAI silently fixed their oopsie it does not happen often, but it can. waiting just a few hours may save you trouble