Skip to content

feat(llms-upstage, embeddings-upstage): add solar-pro4, solar-mini4 and solar-embedding-2 - #23548

Open
fjvbn2003 wants to merge 1 commit into
run-llama:mainfrom
fjvbn2003:upstage-solar-pro4
Open

fjvbn2003 wants to merge 1 commit into
run-llama:mainfrom
fjvbn2003:upstage-solar-pro4

Conversation

@fjvbn2003

@fjvbn2003 fjvbn2003 commented Oct 16, 2026 •

Copy link
Copy Markdown

Description

Upstage released new models, and several existing ones are being retired. This PR registers the new models in the Upstage LLM and embedding integrations:

  • Upstage will fully retire solar-pro3, solar-pro2, solar-mini and syn-250326 on 2026-10-30 (KST). Their replacements are solar-pro4 and solar-mini4.
  • The embedding-query / embedding-passage aliases, which currently point to solar-embedding-1-large-*, will be retired on 2026-12-31 (UTC). solar-embedding-2-* is the current embedding model.

llama-index-llms-upstage (0.9.0 -> 0.9.1)

  • Added solar-pro4 and solar-mini4 to CHAT_MODELS (context window 512000) and FUNCTION_CALLING_MODELS, and solar-pro4 to DOC_PARSING_MODELS. Without that entry, moving from solar-pro3 to solar-pro4 would make file_path= raise ValueError, and after 2026-10-30 no model on the list would remain. solar-mini4 is left out of DOC_PARSING_MODELS, since no solar-mini* model has been on that list before.
  • Fixed solar-pro3 missing from CHAT_MODELS. Because of this, metadata.context_window fell back to the 32768 default. It now uses the documented 128000.
  • Added upstage/solar-pro4-tokenizer to SOLAR_TOKENIZERS. solar-mini4 is not added, because Upstage has not published a tokenizer for it.
  • Fixed a KeyError in Upstage._tokenizer. Any model that is not in SOLAR_TOKENIZERS (for example solar-mini4) used to hit KeyError while building the warning message. Now it warns and approximates with the configured tokenizer_name, which is the tokenizer the method already loads.
  • Widened reasoning_effort from low | medium | high to the values the API accepts: none | minimal | low | medium | high | xhigh | max.

llama-index-embeddings-upstage (0.7.0 -> 0.7.1)

  • Added solar-embedding-2 to UPSTAGE_EMBEDDING_MODELS. It maps to solar-embedding-2-query / solar-embedding-2-passage, and the existing -query / -passage suffix stripping works for it too.
  • The default model is still embedding. solar-embedding-2 returns 1024-dim vectors, while embedding / solar-embedding-1-large return 4096-dim vectors. Changing the default in a patch release would quietly break existing vector indexes, so new users should pass model="solar-embedding-2" explicitly. Switching the default before the alias is retired can be done in a separate PR if you prefer.

The context-window values follow Upstage's docs. The docs write solar-pro3 as both "128K" and "128,000", so "512K" for solar-pro4 / solar-mini4 is recorded as 512000 rather than 524288.

Responses with reasoning already work. Upstage extends llama_index.llms.openai.OpenAI, and llama-index-llms-openai >= 0.7.9 (0.7.10 in this package's uv.lock) turns the reasoning field into a ThinkingBlock, for both normal and streamed responses. This PR does not change that.

Official docs:

API behavior I checked by hand on 2026-10-16 17:33 UTC against https://api.upstage.ai/v1. I did this outside the test suite, and the tests in this PR are fully mocked:

Check Model(s) Result
GET /models solar-pro4, solar-mini4, solar-pro3 listed 200
POST /chat/completions (plain) solar-pro4, solar-mini4 200
POST /chat/completions (streaming with usage, tools, json_schema strict) solar-pro4 200; usage in final chunk, finish_reason=tool_calls
POST /chat/completions, reasoning_effort = none, minimal, low, medium, high, xhigh, max solar-pro4 200. none / minimal return no reasoning. low and above return message.reasoning and usage.completion_tokens_details.reasoning_tokens
POST /chat/completions, reasoning_effort=low solar-mini4 200 (accepted)
POST /chat/completions, reasoning_effort="foo" solar-pro4 400, the error lists the 7 values above
POST /embeddings (2-item batch) solar-embedding-2-query, solar-embedding-2-passage 200, 1024-dim
POST /embeddings embedding-query, solar-embedding-1-large-query 200, 4096-dim
Chat and embedding calls on the legacy base https://api.upstage.ai/v1/solar (the integrations' default) — 200, same results as /v1

Disclosure: I work at Upstage.

AI assistance: I drafted this change with an AI coding assistant (Claude), covering the model-table updates, the _tokenizer fallback and the new unit tests. The model values were checked against Upstage's docs and the API calls in the table above, also with Claude's help. The checks I ran locally are listed below.

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

New tests (no network, fully mocked):

  • llms-upstage/tests/test_upstage.py
    • test_model_metadata: context window and function-calling flag for solar-mini, solar-pro2, solar-pro3, solar-pro4, solar-mini4.
    • test_tokenizer_without_registered_tokenizer: no KeyError for solar-mini4, it warns and loads tokenizer_name.
    • test_tokenizer_mismatch_warning: the mismatch warning names upstage/solar-pro4-tokenizer.
    • test_parameter_integration: now covers all 7 reasoning_effort values.
  • embeddings-upstage/tests/unit_tests/test_embeddings_upstage.py
    • test_upstage_embedding_2_model_name: engine names, including suffix stripping.
    • test_upstage_embedding_2_request_model: query and passage requests are sent with the right model names, using a mocked client.

Run locally (Python 3.12, Linux x86_64, uv, in a throwaway container):

  • cd llama-index-integrations/llms/llama-index-llms-upstage && uv run -- pytest: 37 passed
  • cd llama-index-integrations/embeddings/llama-index-embeddings-upstage && uv run -- pytest: 14 passed
  • python -m py_compile on every changed .py file, tomllib on both pyproject.toml files
  • uv run make lint (black / ruff / codespell / mypy): not run, left to CI

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods

🤖 Generated with Claude Code

…nd solar-embedding-2

Upstage retires solar-pro3, solar-pro2 and solar-mini on 2026-10-30
(KST). Register solar-pro4 and solar-mini4 (512K context, function
calling), add the missing solar-pro3 context window (it fell back to
32K), accept all seven reasoning_effort values, warn instead of
raising KeyError when a model has no registered tokenizer, and add
solar-embedding-2 (1024 dimensions) to the embedding model table.

Signed-off-by: YoungjuKim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant