Skip to content

feat(providers): modernize Naver CLOVA Studio chat and embeddings - #12277

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
backryun:feat/clova-studio-v3
Sep 3, 2026
Merged

feat(providers): modernize Naver CLOVA Studio chat and embeddings#12277
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
backryun:feat/clova-studio-v3

Conversation

@backryun

@backryun backryun commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Modernize Naver CLOVA Studio as one provider change:

  • migrate chat from the OpenAI compatibility shim to native Chat Completions v3
  • add native CLOVA Embedding v2 behind the OpenAI-compatible /v1/embeddings surface
  • keep the whole change in one commit and one PR

Chat Completions v3

clova-studio now targets /v3/chat-completions/{modelName} with a dedicated
clova wire format, OpenAI-to-CLOVA request translation, CLOVA-to-OpenAI response
translation, and a small specialized executor that owns the model-in-path URL rule.

Supported and live-verified models:

Model Text Vision Reasoning Tools Structured output
HCX-005 yes URL + base64 no yes no
HCX-007 yes no yes yes yes
HCX-DASH-002 yes no no yes no

The translator encodes the upstream constraints discovered during live verification:

  • HCX-007 uses maxCompletionTokens and is the only model receiving thinking
  • function calling on HCX-007 forces thinking.effort: "none"
  • function-calling output caps below 1024 are raised to the upstream minimum
  • only toolChoice: "auto" and "none" are forwarded
  • public image URLs and full base64 data URIs are supported on HCX-005
  • terminal result events do not repeat text/tool calls already emitted by token events
  • upstream status envelopes are converted into sanitized provider failures

Embedding v2

The embedding registry now exposes:

clova-studio/clova-embedding-v2

The native endpoint accepts one { "text": ... } input per request and returns a
CLOVA envelope rather than OpenAI's data[] shape. OmniRoute therefore:

  • validates non-empty text-only input
  • fans an OpenAI batch out sequentially, preserving input order and response indexes
  • normalizes every native response into OpenAI object: "list" output
  • aggregates prompt/total token usage across the batch
  • counts the real number of upstream requests for quota accounting
  • rejects unsupported base64 encoding, token-array input, and non-1024 dimensions
  • converts HTTP-200 CLOVA error or malformed envelopes into provider failures

Quality and regression work

  • moved the model-path rule out of the already-large default executor into
    ClovaStudioExecutor
  • split the embedding handler into bounded lifecycle helpers without changing the
    existing provider contracts
  • updated the provider translate-path and specialized-executor golden snapshots
  • registered the new translator pair and specialized executor with repository gates

Verification

  • CLOVA, embedding, executor, and golden regression set: 139/139 passed
  • Vitest: 50 files, 463 tests passed
  • npm run typecheck:core: passed
  • open-sse typecheck: 0 errors
  • API frozen-baseline gate: passed with no new errors
  • complexity new-code gate: 0 cyclomatic / 0 cognitive violations
  • provider consistency: passed
  • known-symbols: passed
  • scoped ESLint and formatting: passed

Scope note

CLOVA's reranker remains intentionally excluded. It behaves as a RAG answer generator
without relevance scores and does not satisfy OmniRoute's /v1/rerank contract.

@backryun
backryun force-pushed the feat/clova-studio-v3 branch from 1077b11 to fcc2423 Compare September 1, 2026 10:46
@backryun backryun changed the title feat(providers): migrate Naver CLOVA Studio to the native Chat Completions v3 API feat(providers): modernize Naver CLOVA Studio chat and embeddings Sep 1, 2026
@backryun
backryun force-pushed the feat/clova-studio-v3 branch 13 times, most recently from 80c15c4 to b9645a9 Compare September 3, 2026 03:52
@backryun
backryun force-pushed the feat/clova-studio-v3 branch from b9645a9 to f243ad9 Compare September 3, 2026 04:43
diegosouzapw pushed a commit that referenced this pull request Sep 3, 2026
Validado em lote numa worktree combinada com #12524, #12538, #12277 e #12367 sobre o tip de release/v3.8.51: os quatro boardaram sem conflito (áreas disjuntas — zai-web, nvidia, clova, cursor/devin/fable). typecheck:core limpo, check:provider-consistency OK (272 entradas REGISTRY, 355 providers canônicos), check:known-symbols OK, e 305/305 nos testes tocados pelos quatro PRs. Os IDs de modelo adicionados foram conferidos individualmente. Obrigado, @backryun.
diegosouzapw pushed a commit that referenced this pull request Sep 3, 2026
Validado em lote numa worktree combinada com #12524, #12538, #12277 e #12367 sobre o tip de release/v3.8.51: os quatro boardaram sem conflito (áreas disjuntas — zai-web, nvidia, clova, cursor/devin/fable). typecheck:core limpo, check:provider-consistency OK (272 entradas REGISTRY, 355 providers canônicos), check:known-symbols OK, e 305/305 nos testes tocados pelos quatro PRs. Os IDs de modelo adicionados foram conferidos individualmente. Obrigado, @backryun.
@diegosouzapw
diegosouzapw merged commit 82c64d7 into diegosouzapw:release/v3.8.51 Sep 3, 2026
16 checks passed
diegosouzapw pushed a commit that referenced this pull request Sep 3, 2026
Validado em lote numa worktree combinada com #12524, #12538, #12277 e #12367 sobre o tip de release/v3.8.51: os quatro boardaram sem conflito (áreas disjuntas — zai-web, nvidia, clova, cursor/devin/fable). typecheck:core limpo, check:provider-consistency OK (272 entradas REGISTRY, 355 providers canônicos), check:known-symbols OK, e 305/305 nos testes tocados pelos quatro PRs. Os IDs de modelo adicionados foram conferidos individualmente. Obrigado, @backryun.
@backryun
backryun deleted the feat/clova-studio-v3 branch September 3, 2026 10:53
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.

2 participants