Skip to content

Breaking change in v4.91 — embeddings API #1446

Closed
@kenn

Description

@kenn

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

After updating from v4.90.0 to v4.91.0, the response from embeddings API is broken.

v4.90.0...v4.91.0

Note that it also ignores the dimensions parameter — I'm setting 256 but it returns text-embedding-3-large's full size, 2048.

Before the update:

[
    0.012919282,  -0.048197057,  -0.03977754,  -0.05362297,  -0.04404343,
    0.051452603,  -0.010318586,   0.07656147,  -0.03508132,  0.062790886,
    0.028588938,  -0.010150195,  0.002041733,  -0.15342231, -0.013097026,
    0.058599837,   -0.03846784,   0.04516603, -0.061032142, -0.018494872,
    -0.04572733,    -0.0579637, -0.038505256,  0.022489466,   0.07394207,
    -0.00986019,  -0.011366348,  0.005856242,  0.010393426,  -0.05425911,
   -0.028233448,   0.046138953,   0.11660095,   0.10956598,  0.046400893,
   -0.012891216,  -0.038804617, -0.056354634,  -0.02443531,  -0.04853384,
   -0.046400893, -0.0034543409,  -0.11443059,   0.10140841, -0.009944385,
     0.04969386,  -0.056579154,  0.014172854,  0.011927649,    0.0877875,
    0.060021803,    0.04999322,  -0.06320251,  0.052687466,  0.021479124,
  -0.0039641894,   0.028794749,      0.10066, 0.0050984854,  -0.01714775,
    0.015454492,   -0.11884616,  0.006408188,  0.037663307,   0.18111317,
    0.036129083,    0.07693568,  0.102231644, -0.020712012,   0.02020684,
   -0.043070506,   -0.07962992,   0.12543209,   0.06260379,  -0.09197855,
   -0.033004507,   0.015389007, -0.039103977, -0.027821826,  0.060545683,
     0.05766434,    0.01985135,  0.015342231,  0.004401536,  0.010374716,
    0.033584516,    0.03459486,  -0.19937417,  0.006913359, 0.0067730336,
   0.0040483843,   -0.07266979, -0.032312237, -0.018990688,  0.055531394,
   -0.056167535,  -0.026830195, -0.062416688, -0.006791744,  -0.12595597,
  ... 156 more items
]

After the update:

[
   9.248569864543793e-44,  2.6624670822171524e-44, 1.401298464324817e-45,
   1.401298464324817e-45,   1.757928923495483e-41,                     0,
   6.025583396596713e-44,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
  1.7938021641821983e-41, 0.000010550487786531448,   9.4039548065783e-38,
  1.8364016374976728e-41,  4.9594755249383926e-39,  3.003515303134918e-8,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,                       0,                     0,
                       0,
  ... 1948 more items
]

To Reproduce

  1. Install v4.90
  2. Inspect embeddings response
  3. Update from v4.90 to v4.91
  4. Inspect embeddings response

Code snippets

let embedding = await openai.embeddings.create({
  model: 'text-embedding-3-large',
  dimensions: 256,
  input,
})

OS

macOS

Node version

Node v22

Library version

openai v4.91.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions