[GH-ISSUE #21279] issue: /embeddings endpoint not behaving as expected for list of input strings #122739

Closed
opened 2026-05-21 01:41:36 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @lufixSch on GitHub (Feb 9, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21279

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.7.2

Ollama Version (if applicable)

v0.13.5-rocm

Operating System

Debian 12

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When providing multiple input strings for embeddings to /api/embeddings it should return the same number of embeddings.

url http://localhost:8080/api/embeddings \                                
  -H "Content-Type: application/json" \    
  -d '{    
    "input": [ "King", "Queen"],
    "model": "ollama.nomic-embed-text:latest"
  }' 

This should data looking like

{
  data: [
    {
        ....
        embedding: [...]
    },
    {
        ....
        embedding: [...]
    },
  ]
  ...
}

Actual Behavior

Currently, the example request above only returns one item in the data array independent of the number of strings in the input array. It seems like the strings are somehow concatenated.

From my testing the Ollama API produces the correct output

Actual Output

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        -0.1235935389995575,
        0.2979576885700226,
        -3.8321280479431152,
        0.06490825116634369,
        1.4997217655181885,
        0.23725372552871704,
        -0.7657594680786133,
        -0.44905999302864075,
        -0.40290766954421997,
        -1.2585904598236084,
        -0.8907132148742676,
        1.7129530906677246,
        0.18261347711086273,
        0.16515977680683136,
        0.1358434408903122,
        -1.0565314292907715,
        0.05628182366490364,
        -1.4227982759475708,
        -0.9265726804733276,
        1.2346789836883545,
        -0.869795560836792,
        0.8156739473342896,
        -0.1964532732963562,
        -0.8917422890663147,
        4.122847557067871,
        -0.3858839273452759,
        0.8615707755088806,
        1.2721683979034424,
        -0.07920172065496445,
        0.4308660924434662,
        0.24778378009796143,
        -0.8210300207138062,
        -0.39467135071754456,
        0.38251960277557373,
        -2.016828775405884,
        0.10897833853960037,
        0.2880738377571106,
        0.07096265256404877,
        0.7655657529830933,
        -0.5449911952018738,
        0.4685736894607544,
        0.9350849390029907,
        0.29219233989715576,
        -0.5172127485275269,
        1.4101159572601318,
        0.662940502166748,
        0.7715400457382202,
        1.0457885265350342,
        1.2640401124954224,
        -0.7004392147064209,
        -0.9447824954986572,
        1.1912788152694702,
        -0.018400177359580994,
        -0.653523325920105,
        1.1665945053100586,
        1.47280752658844,
        0.48362094163894653,
        -0.45831480622291565,
        -0.4412156045436859,
        0.6628015041351318,
        0.6836187839508057,
        0.9972008466720581,
        -0.5329555869102478,
        1.0754828453063965,
        0.8476595878601074,
        -1.6744518280029297,
        0.44178301095962524,
        1.1990994215011597,
        0.8400084972381592,
        -0.04898938164114952,
        1.4468802213668823,
        -0.5757501125335693,
        -0.2821705937385559,
        0.9992217421531677,
        -0.6219626665115356,
        -0.9367955923080444,
        -0.12953974306583405,
        -0.02084953896701336,
        0.08652904629707336,
        0.5486559271812439,
        -0.24697212874889374,
        -0.4713019132614136,
        1.9714564085006714,
        0.40910547971725464,
        0.9355549216270447,
        0.24021385610103607,
        0.02176358364522457,
        0.023709028959274292,
        -1.546933889389038,
        0.5171078443527222,
        0.4100355803966522,
        -0.6108710169792175,
        0.7407118082046509,
        0.5093440413475037,
        -2.104294776916504,
        -0.3253520429134369,
        0.03335748612880707,
        1.6631779670715332,
        -0.9059250354766846,
        -0.5344799757003784,
        -0.7250455617904663,
        0.40125519037246704,
        0.7490237951278687,
        -0.42418158054351807,
        0.0988340824842453,
        0.3069101572036743,
        0.15079626441001892,
        1.2323310375213623,
        -0.7751261591911316,
        0.21228913962841034,
        0.30002331733703613,
        1.5777796506881714,
        -0.19046643376350403,
        -0.630710780620575,
        1.3352199792861938,
        -0.4245496988296509,
        0.558790922164917,
        -1.1115217208862305,
        0.4450365900993347,
        0.22316041588783264,
        -1.005136251449585,
        -0.0825442224740982,
        0.6897973418235779,
        1.0565507411956787,
        0.11492376029491425,
        0.6797562837600708,
        -0.8107715249061584,
        0.7590851783752441,
        0.4208243489265442,
        -0.9659234881401062,
        -0.2520817518234253,
        -0.13518431782722473,
        0.05275534838438034,
        -0.7264068126678467,
        -0.06689289212226868,
        0.08459655940532684,
        -1.2172925472259521,
        -1.0143812894821167,
        0.016896020621061325,
        0.22554375231266022,
        0.1990184187889099,
        -0.05921025574207306,
        0.4937337040901184,
        -1.6987520456314087,
        -0.03548426181077957,
        -0.38974180817604065,
        0.9524915218353271,
        -1.3890374898910522,
        -1.5859715938568115,
        1.5298795700073242,
        0.2176760733127594,
        0.13632507622241974,
        0.6885255575180054,
        0.3666647970676422,
        1.1645021438598633,
        -0.7006441950798035,
        0.6263612508773804,
        0.5817133188247681,
        0.3561830222606659,
        -0.429132342338562,
        -0.026898585259914398,
        0.7711211442947388,
        -1.5492172241210938,
        0.055239237844944,
        0.42597222328186035,
        -1.6440211534500122,
        -1.1940579414367676,
        1.1959002017974854,
        -0.25109151005744934,
        0.8491511940956116,
        -0.5387393236160278,
        -0.05761149525642395,
        0.11869317293167114,
        -0.22489403188228607,
        -0.45827609300613403,
        -0.41346612572669983,
        -0.6564160585403442,
        -0.2649245262145996,
        -0.19175192713737488,
        0.13535192608833313,
        0.11229485273361206,
        -0.5950602293014526,
        0.9470419883728027,
        0.41164740920066833,
        -1.025262713432312,
        -0.4581913352012634,
        0.42531973123550415,
        -0.19886982440948486,
        -0.48052796721458435,
        -0.6970343589782715,
        0.16560691595077515,
        0.08866269886493683,
        -0.39629095792770386,
        0.3164283335208893,
        -0.8486812114715576,
        -0.8898637294769287,
        0.5101338624954224,
        0.13485172390937805,
        0.7980977296829224,
        -0.8937874436378479,
        -0.16589826345443726,
        -0.4822102189064026,
        -0.14173758029937744,
        -1.2913697957992554,
        -0.5449023246765137,
        1.1770460605621338,
        -0.019093550741672516,
        -0.3071053624153137,
        -0.2865912616252899,
        0.11927642673254013,
        0.6946642398834229,
        -0.8748968839645386,
        -0.4980035126209259,
        0.0409659780561924,
        -0.3401109278202057,
        0.07026223838329315,
        0.8362431526184082,
        -1.1717185974121094,
        -1.9381325244903564,
        0.3852232098579407,
        0.4732193350791931,
        0.31642746925354004,
        -0.9447082877159119,
        -0.3731362223625183,
        0.9703434109687805,
        0.1984679400920868,
        -0.1630120873451233,
        -0.3300391435623169,
        0.6986883878707886,
        -0.09821246564388275,
        -0.27061572670936584,
        -1.630652666091919,
        1.0672199726104736,
        0.629432737827301,
        -1.2536888122558594,
        0.5746123790740967,
        -0.951727032661438,
        2.278465509414673,
        -0.4311128556728363,
        1.0515819787979126,
        -0.2623652219772339,
        1.1018873453140259,
        0.704853892326355,
        0.08504119515419006,
        -0.6996264457702637,
        0.20819149911403656,
        0.2362678349018097,
        -0.16624830663204193,
        -0.12217064201831818,
        0.7109436988830566,
        0.45385071635246277,
        -0.211708202958107,
        0.27896156907081604,
        1.1259984970092773,
        1.2398889064788818,
        -1.0285992622375488,
        -1.3178942203521729,
        0.6303926110267639,
        0.08424854278564453,
        -1.4987738132476807,
        0.511114239692688,
        -0.566271185874939,
        -0.2842939496040344,
        -0.8707544207572937,
        -0.4320569932460785,
        -0.21704205870628357,
        -0.33205458521842957,
        0.2873898148536682,
        0.08914998173713684,
        -0.037236977368593216,
        0.11162964254617691,
        0.9229543209075928,
        0.3785226345062256,
        1.4772014617919922,
        -0.511780321598053,
        0.2351684868335724,
        0.3035051226615906,
        -0.3860822319984436,
        -1.0468000173568726,
        -0.17943081259727478,
        0.04165099561214447,
        -0.13220468163490295,
        -0.45430004596710205,
        1.115155577659607,
        -0.13874474167823792,
        0.16822372376918793,
        0.13625364005565643,
        -0.07363878190517426,
        0.19032731652259827,
        -0.03237801045179367,
        0.18101012706756592,
        -0.5900834202766418,
        -1.0360028743743896,
        1.534388542175293,
        -0.17884191870689392,
        0.17345726490020752,
        1.3811686038970947,
        -0.06105845421552658,
        -0.13470815122127533,
        0.1607167273759842,
        1.5172497034072876,
        0.5957608819007874,
        0.2690841555595398,
        0.19834038615226746,
        0.07340025901794434,
        0.8642289638519287,
        1.5605270862579346,
        -0.6771895885467529,
        0.2767178416252136,
        -0.8327000141143799,
        -0.9550595879554749,
        0.06971029937267303,
        -0.5825885534286499,
        0.6969847679138184,
        -1.9450652599334717,
        -0.803554892539978,
        0.2760460376739502,
        0.146476149559021,
        1.1678919792175293,
        0.8167911767959595,
        -0.020974650979042053,
        -0.3755420446395874,
        0.6581571698188782,
        -0.8709913492202759,
        -1.0483102798461914,
        0.9356482625007629,
        -0.37683993577957153,
        0.47019070386886597,
        0.3661019504070282,
        -1.6638615131378174,
        -0.17094703018665314,
        1.7733290195465088,
        0.6979854106903076,
        -0.9749007225036621,
        -0.5959710478782654,
        1.0941171646118164,
        -0.24623648822307587,
        0.06784133613109589,
        -1.2210381031036377,
        1.9116766452789307,
        0.7399797439575195,
        0.08913300931453705,
        0.6054646372795105,
        -0.9326039552688599,
        0.5108784437179565,
        0.3367619514465332,
        -1.5416209697723389,
        0.5235661268234253,
        0.18615713715553284,
        -0.6538968682289124,
        -0.5988930463790894,
        0.2694244980812073,
        -0.6600555181503296,
        -0.022182181477546692,
        0.038327377289533615,
        1.0228674411773682,
        0.6241437196731567,
        0.5165682435035706,
        0.7095462083816528,
        -0.4152370095252991,
        1.2456142902374268,
        -0.023230284452438354,
        -0.038822147995233536,
        1.8454867601394653,
        -0.6372010707855225,
        1.827437162399292,
        0.1968461126089096,
        0.14380256831645966,
        0.8454872369766235,
        0.8816013336181641,
        0.2670537233352661,
        -0.39135828614234924,
        -0.09630748629570007,
        0.06399070471525192,
        -0.16366416215896606,
        0.01883086748421192,
        -2.180839776992798,
        -0.040053755044937134,
        -0.5600237250328064,
        0.24114787578582764,
        -0.7348618507385254,
        -0.4540804326534271,
        -0.010472167283296585,
        0.17698344588279724,
        0.8884962797164917,
        -0.06527488678693771,
        0.4593261480331421,
        -0.2077968418598175,
        -0.013381455093622208,
        1.4740476608276367,
        -0.9123024940490723,
        -0.9899435043334961,
        -0.3552975058555603,
        0.04264437034726143,
        0.11713863909244537,
        -1.2190489768981934,
        1.5442500114440918,
        0.12786518037319183,
        0.4075678884983063,
        -0.4113854765892029,
        -0.9505652189254761,
        -1.0877870321273804,
        0.21882465481758118,
        0.006948206573724747,
        -0.8530074954032898,
        1.0712335109710693,
        0.27521875500679016,
        -1.658525824546814,
        2.364851951599121,
        -0.12999463081359863,
        0.039028823375701904,
        0.47344091534614563,
        -0.8328233361244202,
        -0.8187723159790039,
        0.3742932379245758,
        0.755134642124176,
        1.0245122909545898,
        -0.4914112687110901,
        -0.16287174820899963,
        -0.0028494559228420258,
        1.5114291906356812,
        0.18844395875930786,
        0.4376320242881775,
        0.361108660697937,
        0.09924716502428055,
        0.8936202526092529,
        0.7715522050857544,
        0.5182390213012695,
        0.3788002133369446,
        -0.9628591537475586,
        0.5212647914886475,
        0.7581303119659424,
        -0.18395179510116577,
        -0.30136001110076904,
        -0.45353415608406067,
        -0.5499297976493835,
        1.338361382484436,
        0.6724979877471924,
        -0.6211994290351868,
        0.09029357135295868,
        0.8040875196456909,
        -1.1629676818847656,
        -0.7855790257453918,
        0.032906465232372284,
        0.38847747445106506,
        1.4648581743240356,
        1.721725344657898,
        -1.092329740524292,
        -0.8919039964675903,
        0.8332518935203552,
        1.0502147674560547,
        0.5503103733062744,
        -0.6826260089874268,
        0.16659893095493317,
        2.479687213897705,
        -0.3770647644996643,
        -0.939597487449646,
        0.0769461840391159,
        -0.49007266759872437,
        0.852462649345398,
        0.6975457668304443,
        -0.4109927713871002,
        -1.6483800411224365,
        0.3212272524833679,
        -0.2251497060060501,
        -0.4729236364364624,
        0.05132041871547699,
        -0.6669262051582336,
        1.3895999193191528,
        1.3108938932418823,
        -1.4545984268188477,
        0.6885675191879272,
        1.4116542339324951,
        -0.2716575264930725,
        0.938674807548523,
        -0.4924032688140869,
        -1.061600685119629,
        0.24943657219409943,
        -0.235004261136055,
        0.579732358455658,
        0.7289153337478638,
        -0.7652968168258667,
        -0.5381343364715576,
        -1.7734429836273193,
        0.22907841205596924,
        0.34949880838394165,
        0.29699015617370605,
        0.03918980807065964,
        0.25278329849243164,
        -0.9249261617660522,
        0.24258451163768768,
        -0.1272609829902649,
        -0.6921945214271545,
        -0.009290996938943863,
        -0.3873688578605652,
        -0.3860800266265869,
        -1.3298789262771606,
        1.4210972785949707,
        -0.35016730427742004,
        1.2689337730407715,
        0.11612001061439514,
        -0.19504085183143616,
        -0.6413400173187256,
        0.30128711462020874,
        0.9637807607650757,
        0.05508702993392944,
        1.4071893692016602,
        -1.4668000936508179,
        -1.0565290451049805,
        -1.1569163799285889,
        -1.6212661266326904,
        -0.18132993578910828,
        0.4805716872215271,
        -0.38926202058792114,
        0.6006128787994385,
        -1.042900562286377,
        0.9806517362594604,
        -0.9404887557029724,
        -1.676098346710205,
        -0.3457490801811218,
        0.27547696232795715,
        -1.1288681030273438,
        -0.8971480131149292,
        0.05472259223461151,
        -0.6632480621337891,
        -0.36457470059394836,
        0.2015199214220047,
        -0.7051117420196533,
        0.7915832996368408,
        -0.8358277082443237,
        0.3654375374317169,
        -0.2843966484069824,
        -0.7230473160743713,
        -0.7807490825653076,
        0.6517481207847595,
        -0.27787166833877563,
        1.2730929851531982,
        -0.44727563858032227,
        -0.23219309747219086,
        1.7756596803665161,
        0.5803457498550415,
        0.26966404914855957,
        0.18578600883483887,
        0.2931836247444153,
        0.7528008222579956,
        -0.3444408178329468,
        -1.5992335081100464,
        0.7240362167358398,
        -0.08545860648155212,
        -0.1303713172674179,
        0.8231654167175293,
        -0.9716172218322754,
        -0.07596196234226227,
        -0.3472306728363037,
        -0.4465499520301819,
        -0.23233076930046082,
        0.17850908637046814,
        -0.3054603338241577,
        -1.067833662033081,
        -1.3055598735809326,
        -0.20936577022075653,
        0.6206551790237427,
        -0.020481035113334656,
        0.11716893315315247,
        1.1416234970092773,
        -0.8352854251861572,
        0.443550169467926,
        0.9587496519088745,
        0.8436781167984009,
        0.08360545337200165,
        -1.4358365535736084,
        -0.8065476417541504,
        -0.4734974801540375,
        -0.6206215620040894,
        -0.7181236147880554,
        -0.09807350486516953,
        0.2679937481880188,
        -0.06430327892303467,
        -1.169477105140686,
        0.46892404556274414,
        0.8890949487686157,
        -0.6944479942321777,
        -0.9484971165657043,
        0.4229693114757538,
        -1.254276156425476,
        1.1885534524917603,
        0.5542021989822388,
        -2.154212236404419,
        1.2684988975524902,
        -1.494149923324585,
        -0.6170872449874878,
        0.46429312229156494,
        0.2604482173919678,
        0.596638560295105,
        0.26307159662246704,
        -0.17048797011375427,
        -0.8347820043563843,
        -0.2092263400554657,
        -0.23920881748199463,
        -0.5378260612487793,
        0.8795181512832642,
        0.37711089849472046,
        0.8928263187408447,
        -1.6325607299804688,
        -0.4065534472465515,
        1.7807213068008423,
        -0.12524239718914032,
        0.5468525886535645,
        -0.09999237209558487,
        0.9183263778686523,
        0.844714879989624,
        0.7692152857780457,
        0.6305291652679443,
        -0.49569302797317505,
        0.41026610136032104,
        -1.1524055004119873,
        1.403892159461975,
        0.2298983633518219,
        -0.2363789975643158,
        -0.3176352381706238,
        -0.26945969462394714,
        -1.678436040878296,
        0.8817697763442993,
        -0.8301558494567871,
        1.504224181175232,
        -0.5357568860054016,
        -0.9140831232070923,
        -0.09830264002084732,
        -1.1642475128173828,
        0.24774900078773499,
        -0.4337470233440399,
        -0.17235904932022095,
        -1.0900328159332275,
        0.018942512571811676,
        -1.3181487321853638,
        0.0511818528175354,
        0.4739149212837219,
        0.07015874981880188,
        -0.3062388300895691,
        0.3426445722579956,
        0.30741965770721436,
        0.7344735860824585,
        0.01285833865404129,
        1.9948543310165405,
        1.6212226152420044,
        -0.8892537355422974,
        -0.4942972958087921,
        -0.02271433174610138,
        0.730131983757019,
        -1.356987714767456,
        1.7609198093414307,
        0.7573607563972473,
        0.5029474496841431,
        0.1629752665758133,
        -0.6859598159790039,
        -1.4133977890014648,
        0.12002256512641907,
        -1.5016813278198242,
        -1.9296400547027588,
        -1.4819669723510742,
        -0.23229928314685822,
        -0.374140202999115,
        -0.7236201763153076,
        0.15084758400917053,
        0.5788085460662842,
        -0.4357958137989044,
        -0.5368069410324097,
        -0.41481757164001465,
        -1.6507649421691895,
        -0.36323192715644836,
        0.35549598932266235,
        0.5469932556152344,
        -0.8050944805145264,
        -0.8150026798248291,
        -0.48267632722854614,
        0.8252065181732178,
        0.8813247680664062,
        0.6115109920501709,
        0.16158917546272278,
        0.9147870540618896,
        -0.05866376683115959,
        -0.971560537815094,
        0.4463620185852051,
        -1.0501164197921753,
        0.1471312940120697,
        -0.6811219453811646,
        2.0375938415527344,
        -0.5732227563858032,
        -0.17330321669578552,
        -1.1065436601638794,
        -0.551996111869812,
        -1.094176173210144,
        -0.758046567440033,
        -0.48421865701675415,
        -0.20725557208061218,
        0.6442157030105591,
        -0.22135555744171143,
        -0.3230605125427246,
        -0.8825535178184509,
        0.524989128112793,
        0.354478657245636,
        0.10762830078601837,
        0.274623304605484,
        0.6924552917480469,
        -0.14365965127944946,
        -0.463248074054718,
        0.5207055807113647,
        0.7165172696113586,
        -0.8872004747390747,
        -0.27638429403305054,
        -0.7192537784576416,
        0.4281391501426697,
        -0.4671197533607483,
        1.0279932022094727,
        1.8372312784194946,
        0.7829179763793945,
        -0.5252571105957031,
        0.05204515904188156,
        0.4787308871746063,
        1.975504755973816,
        1.2498517036437988,
        0.1098567470908165,
        -1.9314379692077637,
        -0.5410401821136475,
        -1.227315068244934,
        -0.5697055459022522,
        0.2888183295726776,
        -0.33359068632125854,
        1.5202808380126953,
        0.09744061529636383,
        0.418418824672699,
        0.9753836393356323,
        -0.4093782901763916,
        0.3990698754787445,
        0.5285646319389343,
        0.14585867524147034,
        -0.3877801299095154,
        -0.15693692862987518,
        -1.3010231256484985,
        -0.5030477046966553,
        -0.32917359471321106,
        1.0988819599151611,
        0.73893141746521,
        1.223437786102295,
        -0.4413664937019348,
        -0.27747827768325806,
        -0.9985222220420837,
        1.658569574356079,
        0.5510129332542419,
        -0.5492314100265503,
        0.3167351484298706,
        0.7053049206733704,
        0.05973665788769722,
        0.9700232744216919,
        -0.2766317129135132,
        0.3291356563568115,
        -1.2571306228637695,
        1.6566710472106934,
        0.9793028831481934,
        -0.002195548266172409,
        0.3434787392616272,
        0.009587671607732773,
        -0.34376031160354614,
        0.32966548204421997,
        -0.038103967905044556,
        -0.6964249014854431,
        -0.875385046005249,
        -0.6755735874176025
      ],
      "index": 0
    }
  ],
  "model": null
}

Steps to Reproduce

  1. Setup OpenWebui with Ollama
  2. Install embedding model (nomic-embed-text in my case)
  3. Go to the SwaggerUI API docs (/docs)
  4. Try the /api/embeddings endpoint with the example data above

Logs & Screenshots

2026-02-09 19:48:02.363 | INFO     | open_webui.routers.ollama:get_all_models:331 - get_all_models()
2026-02-09 19:48:02.389 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - <client-ip> - "GET /api/models HTTP/1.1" 200
2026-02-09 19:48:10.034 | INFO     | open_webui.routers.ollama:embeddings:1079 - generate_ollama_embeddings model='ollama.nomic-embed-text:latest' prompt='King\nQueen' options=None keep_alive=None
2026-02-09 19:48:10.034 | INFO     | open_webui.routers.ollama:get_all_models:331 - get_all_models()
2026-02-09 19:48:10.073 | INFO     | uvicorn.protocols.http.httptools_impl:send:483 - <client-ip> - "POST /api/embeddings HTTP/1.1" 200

Additional Information

The documentation says the endpoint should be OpenAI compatible. From the OpenAI documentation:

Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. [...]

Originally created by @lufixSch on GitHub (Feb 9, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21279 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.7.2 ### Ollama Version (if applicable) v0.13.5-rocm ### Operating System Debian 12 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When providing multiple input strings for embeddings to `/api/embeddings` it should return the same number of embeddings. ```bash url http://localhost:8080/api/embeddings \ -H "Content-Type: application/json" \ -d '{ "input": [ "King", "Queen"], "model": "ollama.nomic-embed-text:latest" }' ``` This should data looking like ``` { data: [ { .... embedding: [...] }, { .... embedding: [...] }, ] ... } ``` ### Actual Behavior Currently, the example request above only returns one item in the data array independent of the number of strings in the input array. It seems like the strings are somehow concatenated. From my testing the Ollama API produces the correct output <details><summary>Actual Output</summary> <p> ```json { "object": "list", "data": [ { "object": "embedding", "embedding": [ -0.1235935389995575, 0.2979576885700226, -3.8321280479431152, 0.06490825116634369, 1.4997217655181885, 0.23725372552871704, -0.7657594680786133, -0.44905999302864075, -0.40290766954421997, -1.2585904598236084, -0.8907132148742676, 1.7129530906677246, 0.18261347711086273, 0.16515977680683136, 0.1358434408903122, -1.0565314292907715, 0.05628182366490364, -1.4227982759475708, -0.9265726804733276, 1.2346789836883545, -0.869795560836792, 0.8156739473342896, -0.1964532732963562, -0.8917422890663147, 4.122847557067871, -0.3858839273452759, 0.8615707755088806, 1.2721683979034424, -0.07920172065496445, 0.4308660924434662, 0.24778378009796143, -0.8210300207138062, -0.39467135071754456, 0.38251960277557373, -2.016828775405884, 0.10897833853960037, 0.2880738377571106, 0.07096265256404877, 0.7655657529830933, -0.5449911952018738, 0.4685736894607544, 0.9350849390029907, 0.29219233989715576, -0.5172127485275269, 1.4101159572601318, 0.662940502166748, 0.7715400457382202, 1.0457885265350342, 1.2640401124954224, -0.7004392147064209, -0.9447824954986572, 1.1912788152694702, -0.018400177359580994, -0.653523325920105, 1.1665945053100586, 1.47280752658844, 0.48362094163894653, -0.45831480622291565, -0.4412156045436859, 0.6628015041351318, 0.6836187839508057, 0.9972008466720581, -0.5329555869102478, 1.0754828453063965, 0.8476595878601074, -1.6744518280029297, 0.44178301095962524, 1.1990994215011597, 0.8400084972381592, -0.04898938164114952, 1.4468802213668823, -0.5757501125335693, -0.2821705937385559, 0.9992217421531677, -0.6219626665115356, -0.9367955923080444, -0.12953974306583405, -0.02084953896701336, 0.08652904629707336, 0.5486559271812439, -0.24697212874889374, -0.4713019132614136, 1.9714564085006714, 0.40910547971725464, 0.9355549216270447, 0.24021385610103607, 0.02176358364522457, 0.023709028959274292, -1.546933889389038, 0.5171078443527222, 0.4100355803966522, -0.6108710169792175, 0.7407118082046509, 0.5093440413475037, -2.104294776916504, -0.3253520429134369, 0.03335748612880707, 1.6631779670715332, -0.9059250354766846, -0.5344799757003784, -0.7250455617904663, 0.40125519037246704, 0.7490237951278687, -0.42418158054351807, 0.0988340824842453, 0.3069101572036743, 0.15079626441001892, 1.2323310375213623, -0.7751261591911316, 0.21228913962841034, 0.30002331733703613, 1.5777796506881714, -0.19046643376350403, -0.630710780620575, 1.3352199792861938, -0.4245496988296509, 0.558790922164917, -1.1115217208862305, 0.4450365900993347, 0.22316041588783264, -1.005136251449585, -0.0825442224740982, 0.6897973418235779, 1.0565507411956787, 0.11492376029491425, 0.6797562837600708, -0.8107715249061584, 0.7590851783752441, 0.4208243489265442, -0.9659234881401062, -0.2520817518234253, -0.13518431782722473, 0.05275534838438034, -0.7264068126678467, -0.06689289212226868, 0.08459655940532684, -1.2172925472259521, -1.0143812894821167, 0.016896020621061325, 0.22554375231266022, 0.1990184187889099, -0.05921025574207306, 0.4937337040901184, -1.6987520456314087, -0.03548426181077957, -0.38974180817604065, 0.9524915218353271, -1.3890374898910522, -1.5859715938568115, 1.5298795700073242, 0.2176760733127594, 0.13632507622241974, 0.6885255575180054, 0.3666647970676422, 1.1645021438598633, -0.7006441950798035, 0.6263612508773804, 0.5817133188247681, 0.3561830222606659, -0.429132342338562, -0.026898585259914398, 0.7711211442947388, -1.5492172241210938, 0.055239237844944, 0.42597222328186035, -1.6440211534500122, -1.1940579414367676, 1.1959002017974854, -0.25109151005744934, 0.8491511940956116, -0.5387393236160278, -0.05761149525642395, 0.11869317293167114, -0.22489403188228607, -0.45827609300613403, -0.41346612572669983, -0.6564160585403442, -0.2649245262145996, -0.19175192713737488, 0.13535192608833313, 0.11229485273361206, -0.5950602293014526, 0.9470419883728027, 0.41164740920066833, -1.025262713432312, -0.4581913352012634, 0.42531973123550415, -0.19886982440948486, -0.48052796721458435, -0.6970343589782715, 0.16560691595077515, 0.08866269886493683, -0.39629095792770386, 0.3164283335208893, -0.8486812114715576, -0.8898637294769287, 0.5101338624954224, 0.13485172390937805, 0.7980977296829224, -0.8937874436378479, -0.16589826345443726, -0.4822102189064026, -0.14173758029937744, -1.2913697957992554, -0.5449023246765137, 1.1770460605621338, -0.019093550741672516, -0.3071053624153137, -0.2865912616252899, 0.11927642673254013, 0.6946642398834229, -0.8748968839645386, -0.4980035126209259, 0.0409659780561924, -0.3401109278202057, 0.07026223838329315, 0.8362431526184082, -1.1717185974121094, -1.9381325244903564, 0.3852232098579407, 0.4732193350791931, 0.31642746925354004, -0.9447082877159119, -0.3731362223625183, 0.9703434109687805, 0.1984679400920868, -0.1630120873451233, -0.3300391435623169, 0.6986883878707886, -0.09821246564388275, -0.27061572670936584, -1.630652666091919, 1.0672199726104736, 0.629432737827301, -1.2536888122558594, 0.5746123790740967, -0.951727032661438, 2.278465509414673, -0.4311128556728363, 1.0515819787979126, -0.2623652219772339, 1.1018873453140259, 0.704853892326355, 0.08504119515419006, -0.6996264457702637, 0.20819149911403656, 0.2362678349018097, -0.16624830663204193, -0.12217064201831818, 0.7109436988830566, 0.45385071635246277, -0.211708202958107, 0.27896156907081604, 1.1259984970092773, 1.2398889064788818, -1.0285992622375488, -1.3178942203521729, 0.6303926110267639, 0.08424854278564453, -1.4987738132476807, 0.511114239692688, -0.566271185874939, -0.2842939496040344, -0.8707544207572937, -0.4320569932460785, -0.21704205870628357, -0.33205458521842957, 0.2873898148536682, 0.08914998173713684, -0.037236977368593216, 0.11162964254617691, 0.9229543209075928, 0.3785226345062256, 1.4772014617919922, -0.511780321598053, 0.2351684868335724, 0.3035051226615906, -0.3860822319984436, -1.0468000173568726, -0.17943081259727478, 0.04165099561214447, -0.13220468163490295, -0.45430004596710205, 1.115155577659607, -0.13874474167823792, 0.16822372376918793, 0.13625364005565643, -0.07363878190517426, 0.19032731652259827, -0.03237801045179367, 0.18101012706756592, -0.5900834202766418, -1.0360028743743896, 1.534388542175293, -0.17884191870689392, 0.17345726490020752, 1.3811686038970947, -0.06105845421552658, -0.13470815122127533, 0.1607167273759842, 1.5172497034072876, 0.5957608819007874, 0.2690841555595398, 0.19834038615226746, 0.07340025901794434, 0.8642289638519287, 1.5605270862579346, -0.6771895885467529, 0.2767178416252136, -0.8327000141143799, -0.9550595879554749, 0.06971029937267303, -0.5825885534286499, 0.6969847679138184, -1.9450652599334717, -0.803554892539978, 0.2760460376739502, 0.146476149559021, 1.1678919792175293, 0.8167911767959595, -0.020974650979042053, -0.3755420446395874, 0.6581571698188782, -0.8709913492202759, -1.0483102798461914, 0.9356482625007629, -0.37683993577957153, 0.47019070386886597, 0.3661019504070282, -1.6638615131378174, -0.17094703018665314, 1.7733290195465088, 0.6979854106903076, -0.9749007225036621, -0.5959710478782654, 1.0941171646118164, -0.24623648822307587, 0.06784133613109589, -1.2210381031036377, 1.9116766452789307, 0.7399797439575195, 0.08913300931453705, 0.6054646372795105, -0.9326039552688599, 0.5108784437179565, 0.3367619514465332, -1.5416209697723389, 0.5235661268234253, 0.18615713715553284, -0.6538968682289124, -0.5988930463790894, 0.2694244980812073, -0.6600555181503296, -0.022182181477546692, 0.038327377289533615, 1.0228674411773682, 0.6241437196731567, 0.5165682435035706, 0.7095462083816528, -0.4152370095252991, 1.2456142902374268, -0.023230284452438354, -0.038822147995233536, 1.8454867601394653, -0.6372010707855225, 1.827437162399292, 0.1968461126089096, 0.14380256831645966, 0.8454872369766235, 0.8816013336181641, 0.2670537233352661, -0.39135828614234924, -0.09630748629570007, 0.06399070471525192, -0.16366416215896606, 0.01883086748421192, -2.180839776992798, -0.040053755044937134, -0.5600237250328064, 0.24114787578582764, -0.7348618507385254, -0.4540804326534271, -0.010472167283296585, 0.17698344588279724, 0.8884962797164917, -0.06527488678693771, 0.4593261480331421, -0.2077968418598175, -0.013381455093622208, 1.4740476608276367, -0.9123024940490723, -0.9899435043334961, -0.3552975058555603, 0.04264437034726143, 0.11713863909244537, -1.2190489768981934, 1.5442500114440918, 0.12786518037319183, 0.4075678884983063, -0.4113854765892029, -0.9505652189254761, -1.0877870321273804, 0.21882465481758118, 0.006948206573724747, -0.8530074954032898, 1.0712335109710693, 0.27521875500679016, -1.658525824546814, 2.364851951599121, -0.12999463081359863, 0.039028823375701904, 0.47344091534614563, -0.8328233361244202, -0.8187723159790039, 0.3742932379245758, 0.755134642124176, 1.0245122909545898, -0.4914112687110901, -0.16287174820899963, -0.0028494559228420258, 1.5114291906356812, 0.18844395875930786, 0.4376320242881775, 0.361108660697937, 0.09924716502428055, 0.8936202526092529, 0.7715522050857544, 0.5182390213012695, 0.3788002133369446, -0.9628591537475586, 0.5212647914886475, 0.7581303119659424, -0.18395179510116577, -0.30136001110076904, -0.45353415608406067, -0.5499297976493835, 1.338361382484436, 0.6724979877471924, -0.6211994290351868, 0.09029357135295868, 0.8040875196456909, -1.1629676818847656, -0.7855790257453918, 0.032906465232372284, 0.38847747445106506, 1.4648581743240356, 1.721725344657898, -1.092329740524292, -0.8919039964675903, 0.8332518935203552, 1.0502147674560547, 0.5503103733062744, -0.6826260089874268, 0.16659893095493317, 2.479687213897705, -0.3770647644996643, -0.939597487449646, 0.0769461840391159, -0.49007266759872437, 0.852462649345398, 0.6975457668304443, -0.4109927713871002, -1.6483800411224365, 0.3212272524833679, -0.2251497060060501, -0.4729236364364624, 0.05132041871547699, -0.6669262051582336, 1.3895999193191528, 1.3108938932418823, -1.4545984268188477, 0.6885675191879272, 1.4116542339324951, -0.2716575264930725, 0.938674807548523, -0.4924032688140869, -1.061600685119629, 0.24943657219409943, -0.235004261136055, 0.579732358455658, 0.7289153337478638, -0.7652968168258667, -0.5381343364715576, -1.7734429836273193, 0.22907841205596924, 0.34949880838394165, 0.29699015617370605, 0.03918980807065964, 0.25278329849243164, -0.9249261617660522, 0.24258451163768768, -0.1272609829902649, -0.6921945214271545, -0.009290996938943863, -0.3873688578605652, -0.3860800266265869, -1.3298789262771606, 1.4210972785949707, -0.35016730427742004, 1.2689337730407715, 0.11612001061439514, -0.19504085183143616, -0.6413400173187256, 0.30128711462020874, 0.9637807607650757, 0.05508702993392944, 1.4071893692016602, -1.4668000936508179, -1.0565290451049805, -1.1569163799285889, -1.6212661266326904, -0.18132993578910828, 0.4805716872215271, -0.38926202058792114, 0.6006128787994385, -1.042900562286377, 0.9806517362594604, -0.9404887557029724, -1.676098346710205, -0.3457490801811218, 0.27547696232795715, -1.1288681030273438, -0.8971480131149292, 0.05472259223461151, -0.6632480621337891, -0.36457470059394836, 0.2015199214220047, -0.7051117420196533, 0.7915832996368408, -0.8358277082443237, 0.3654375374317169, -0.2843966484069824, -0.7230473160743713, -0.7807490825653076, 0.6517481207847595, -0.27787166833877563, 1.2730929851531982, -0.44727563858032227, -0.23219309747219086, 1.7756596803665161, 0.5803457498550415, 0.26966404914855957, 0.18578600883483887, 0.2931836247444153, 0.7528008222579956, -0.3444408178329468, -1.5992335081100464, 0.7240362167358398, -0.08545860648155212, -0.1303713172674179, 0.8231654167175293, -0.9716172218322754, -0.07596196234226227, -0.3472306728363037, -0.4465499520301819, -0.23233076930046082, 0.17850908637046814, -0.3054603338241577, -1.067833662033081, -1.3055598735809326, -0.20936577022075653, 0.6206551790237427, -0.020481035113334656, 0.11716893315315247, 1.1416234970092773, -0.8352854251861572, 0.443550169467926, 0.9587496519088745, 0.8436781167984009, 0.08360545337200165, -1.4358365535736084, -0.8065476417541504, -0.4734974801540375, -0.6206215620040894, -0.7181236147880554, -0.09807350486516953, 0.2679937481880188, -0.06430327892303467, -1.169477105140686, 0.46892404556274414, 0.8890949487686157, -0.6944479942321777, -0.9484971165657043, 0.4229693114757538, -1.254276156425476, 1.1885534524917603, 0.5542021989822388, -2.154212236404419, 1.2684988975524902, -1.494149923324585, -0.6170872449874878, 0.46429312229156494, 0.2604482173919678, 0.596638560295105, 0.26307159662246704, -0.17048797011375427, -0.8347820043563843, -0.2092263400554657, -0.23920881748199463, -0.5378260612487793, 0.8795181512832642, 0.37711089849472046, 0.8928263187408447, -1.6325607299804688, -0.4065534472465515, 1.7807213068008423, -0.12524239718914032, 0.5468525886535645, -0.09999237209558487, 0.9183263778686523, 0.844714879989624, 0.7692152857780457, 0.6305291652679443, -0.49569302797317505, 0.41026610136032104, -1.1524055004119873, 1.403892159461975, 0.2298983633518219, -0.2363789975643158, -0.3176352381706238, -0.26945969462394714, -1.678436040878296, 0.8817697763442993, -0.8301558494567871, 1.504224181175232, -0.5357568860054016, -0.9140831232070923, -0.09830264002084732, -1.1642475128173828, 0.24774900078773499, -0.4337470233440399, -0.17235904932022095, -1.0900328159332275, 0.018942512571811676, -1.3181487321853638, 0.0511818528175354, 0.4739149212837219, 0.07015874981880188, -0.3062388300895691, 0.3426445722579956, 0.30741965770721436, 0.7344735860824585, 0.01285833865404129, 1.9948543310165405, 1.6212226152420044, -0.8892537355422974, -0.4942972958087921, -0.02271433174610138, 0.730131983757019, -1.356987714767456, 1.7609198093414307, 0.7573607563972473, 0.5029474496841431, 0.1629752665758133, -0.6859598159790039, -1.4133977890014648, 0.12002256512641907, -1.5016813278198242, -1.9296400547027588, -1.4819669723510742, -0.23229928314685822, -0.374140202999115, -0.7236201763153076, 0.15084758400917053, 0.5788085460662842, -0.4357958137989044, -0.5368069410324097, -0.41481757164001465, -1.6507649421691895, -0.36323192715644836, 0.35549598932266235, 0.5469932556152344, -0.8050944805145264, -0.8150026798248291, -0.48267632722854614, 0.8252065181732178, 0.8813247680664062, 0.6115109920501709, 0.16158917546272278, 0.9147870540618896, -0.05866376683115959, -0.971560537815094, 0.4463620185852051, -1.0501164197921753, 0.1471312940120697, -0.6811219453811646, 2.0375938415527344, -0.5732227563858032, -0.17330321669578552, -1.1065436601638794, -0.551996111869812, -1.094176173210144, -0.758046567440033, -0.48421865701675415, -0.20725557208061218, 0.6442157030105591, -0.22135555744171143, -0.3230605125427246, -0.8825535178184509, 0.524989128112793, 0.354478657245636, 0.10762830078601837, 0.274623304605484, 0.6924552917480469, -0.14365965127944946, -0.463248074054718, 0.5207055807113647, 0.7165172696113586, -0.8872004747390747, -0.27638429403305054, -0.7192537784576416, 0.4281391501426697, -0.4671197533607483, 1.0279932022094727, 1.8372312784194946, 0.7829179763793945, -0.5252571105957031, 0.05204515904188156, 0.4787308871746063, 1.975504755973816, 1.2498517036437988, 0.1098567470908165, -1.9314379692077637, -0.5410401821136475, -1.227315068244934, -0.5697055459022522, 0.2888183295726776, -0.33359068632125854, 1.5202808380126953, 0.09744061529636383, 0.418418824672699, 0.9753836393356323, -0.4093782901763916, 0.3990698754787445, 0.5285646319389343, 0.14585867524147034, -0.3877801299095154, -0.15693692862987518, -1.3010231256484985, -0.5030477046966553, -0.32917359471321106, 1.0988819599151611, 0.73893141746521, 1.223437786102295, -0.4413664937019348, -0.27747827768325806, -0.9985222220420837, 1.658569574356079, 0.5510129332542419, -0.5492314100265503, 0.3167351484298706, 0.7053049206733704, 0.05973665788769722, 0.9700232744216919, -0.2766317129135132, 0.3291356563568115, -1.2571306228637695, 1.6566710472106934, 0.9793028831481934, -0.002195548266172409, 0.3434787392616272, 0.009587671607732773, -0.34376031160354614, 0.32966548204421997, -0.038103967905044556, -0.6964249014854431, -0.875385046005249, -0.6755735874176025 ], "index": 0 } ], "model": null } ``` </p> </details> ### Steps to Reproduce 1. Setup OpenWebui with Ollama 2. Install embedding model (nomic-embed-text in my case) 3. Go to the SwaggerUI API docs (<openwebui-url>/docs) 4. Try the /api/embeddings endpoint with the example data above ### Logs & Screenshots ``` 2026-02-09 19:48:02.363 | INFO | open_webui.routers.ollama:get_all_models:331 - get_all_models() 2026-02-09 19:48:02.389 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - <client-ip> - "GET /api/models HTTP/1.1" 200 2026-02-09 19:48:10.034 | INFO | open_webui.routers.ollama:embeddings:1079 - generate_ollama_embeddings model='ollama.nomic-embed-text:latest' prompt='King\nQueen' options=None keep_alive=None 2026-02-09 19:48:10.034 | INFO | open_webui.routers.ollama:get_all_models:331 - get_all_models() 2026-02-09 19:48:10.073 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - <client-ip> - "POST /api/embeddings HTTP/1.1" 200 ``` ### Additional Information The documentation says the endpoint should be OpenAI compatible. From the OpenAI documentation: > Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. [...]
GiteaMirror added the bug label 2026-05-21 01:41:36 -05:00
Author
Owner

@tjbck commented on GitHub (Feb 10, 2026):

8fd5c06e5b

<!-- gh-comment-id:3879940803 --> @tjbck commented on GitHub (Feb 10, 2026): 8fd5c06e5bf7e0ccbda15d83338912ea17f66783
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#122739