feat(test): record agents, safety and vector_io integration tests (#2952)

Continue to build on top of
https://github.com/meta-llama/llama-stack/pull/2941

## Test Plan

Run server with `LLAMA_STACK_TEST_INFERENCE_MODE=record` and then run
the integration tests with `--stack-config=server:starter`. Then restart
the server with `LLAMA_STACK_TEST_INFERENCE_MODE=replay` and re-run the
tests. Verify that no request hit Ollama at any point.
This commit is contained in:
Ashwin Bharambe 2025-07-29 14:02:14 -07:00 committed by GitHub
parent 2d1ab3ca55
commit 072d20a124
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 22727 additions and 9 deletions

View file

@ -0,0 +1,421 @@
{
"request": {
"method": "POST",
"url": "http://localhost:11434/api/embeddings",
"headers": {},
"body": {
"model": "all-minilm:l6-v2",
"input": [
"What is the secret string?"
]
},
"endpoint": "/api/embeddings",
"model": "all-minilm:l6-v2"
},
"response": {
"body": {
"__type__": "ollama._types.EmbedResponse",
"__data__": {
"model": "all-minilm:l6-v2",
"created_at": null,
"done": null,
"done_reason": null,
"total_duration": 91772250,
"load_duration": 72008875,
"prompt_eval_count": 6,
"prompt_eval_duration": null,
"eval_count": null,
"eval_duration": null,
"embeddings": [
[
-0.07473014,
0.08137506,
-0.06463602,
0.011821943,
-0.07454815,
0.021821007,
0.077573344,
0.012804661,
0.05853777,
-0.014141324,
0.053993534,
-0.026554074,
-0.018055506,
-0.060447972,
-0.019253474,
-0.006501444,
-0.047272332,
-0.048944764,
-0.090516366,
-0.06656194,
0.09287066,
0.02129739,
-0.013401809,
-0.006629013,
0.0079892,
0.016818035,
0.03971694,
0.021875564,
0.014873574,
-0.039426163,
0.025255844,
-0.036836684,
0.016627828,
0.008789532,
-0.053503897,
0.03616121,
-0.034633957,
-0.009877797,
0.064843215,
-0.01517806,
0.020897496,
-0.07135096,
-0.008519908,
0.05118655,
-0.062102985,
0.059486073,
-0.047937352,
0.07045817,
-0.024867272,
-0.010756205,
0.06538509,
-0.03693754,
-0.08240387,
0.08169191,
0.017090658,
0.012944557,
-0.047139525,
0.0025796075,
0.008701712,
0.099866174,
0.04969699,
-0.025922626,
-0.017354922,
0.03395182,
0.038391408,
-0.054247838,
0.008610521,
-0.04077977,
0.0265637,
-0.07186012,
-0.019953186,
-0.041191205,
-0.07246228,
0.00041248833,
0.018758524,
0.023036895,
0.01662864,
-0.06335885,
0.03495032,
0.050063577,
0.00043262896,
-0.06176693,
0.0062733325,
0.11142063,
0.0040838965,
0.085737824,
0.023284689,
0.05699812,
-0.03149832,
-0.013344509,
-0.045138564,
-0.117300816,
0.016063986,
-0.016894838,
-0.028934335,
0.03575864,
-0.05156192,
0.032958068,
-0.11266628,
0.06640015,
0.037839692,
0.022948038,
0.058071073,
-0.039643735,
-0.03247236,
0.017690921,
-0.005001274,
0.019046135,
0.07745316,
-0.020402163,
-0.020310633,
-0.009519755,
0.0031459313,
-0.0045639877,
-0.029116316,
0.033835515,
0.00050839526,
0.06419946,
0.010721198,
0.124151744,
-0.0053820186,
0.00491648,
-0.059696514,
0.029483523,
-0.13409872,
0.016187217,
-0.048092023,
-6.6084764e-33,
0.012305612,
0.060384244,
0.036461998,
-0.035974216,
-0.04197416,
0.012333701,
-0.084805995,
0.012502633,
0.02794982,
0.0861082,
-0.030791838,
-0.061355945,
-0.0009604986,
-0.0252044,
0.045444816,
-0.027590565,
-0.009594973,
0.006712001,
0.043692384,
-0.021483036,
0.003300438,
0.11860881,
0.047044385,
-0.1348901,
0.025469579,
-0.01029819,
0.0022393467,
-0.061863262,
0.10386513,
0.018658707,
-0.0017492755,
-0.051914047,
0.046442248,
0.03761067,
0.033752125,
0.006650237,
0.022015076,
-0.07834835,
-0.008209136,
0.027432231,
0.017393896,
-0.07524756,
0.006497012,
0.027272953,
0.0005804994,
-0.010941825,
-0.020050043,
-0.00012092298,
0.013705002,
0.004699541,
0.022770848,
0.015477994,
-0.0142482165,
-0.013953546,
0.015865315,
-0.023075614,
0.03379947,
-0.039221376,
-0.043229815,
0.02998769,
-0.01652291,
0.06981088,
0.04606923,
0.05332633,
-0.055300076,
0.02511626,
0.014049543,
-0.09398743,
0.03590562,
0.029452223,
-0.13200304,
-0.005059034,
-0.03784268,
-0.03180819,
-0.095502876,
-0.027853556,
0.0024331037,
-0.007881495,
0.058296,
-0.031999517,
-0.06077097,
-0.023381822,
-0.00048603877,
0.13765746,
-0.060579,
-0.008109843,
-0.034873307,
-0.1024547,
-0.009072849,
-0.018931676,
-0.0016711762,
-0.07710289,
-0.043332253,
-0.03619527,
0.03958017,
3.0217083e-33,
0.0050329794,
0.00016030145,
-0.063078895,
0.012225751,
0.10637338,
0.015972024,
0.006653195,
0.01880781,
-0.04708357,
0.045863643,
0.0076015075,
0.03243478,
0.032097474,
-0.020893326,
0.10697852,
0.0075498912,
0.036074348,
0.1462344,
0.03779065,
-0.043190572,
-0.02176097,
-0.009340132,
-0.06983617,
0.015578788,
0.021121953,
0.030661412,
0.08434581,
-0.09288574,
0.008169474,
0.078080945,
-0.081626564,
0.011895231,
0.017099649,
0.0040119104,
-0.14145434,
0.0040375097,
0.046316408,
0.008959473,
-0.0056506568,
-0.055587813,
0.028007837,
0.055937108,
0.062269785,
0.08602392,
-0.12157818,
0.021943888,
-0.0050934856,
0.029819332,
-0.012127162,
0.048801802,
0.06409215,
-0.041438665,
0.01809265,
-0.028214281,
-0.0213588,
0.05564267,
-0.1547868,
0.027465124,
0.018855799,
0.04327939,
0.011500479,
0.017364705,
-0.023216385,
0.051007293,
0.02946264,
0.012533944,
-0.04542834,
-0.002238765,
-0.05611544,
-0.0789272,
0.07960444,
-0.020431034,
-0.0762138,
0.011588508,
-0.035614885,
-0.04803985,
-0.06607436,
-0.057365946,
-0.040188126,
0.07176218,
0.03135825,
0.02303279,
-0.023997622,
0.023614945,
0.09607302,
-0.06843066,
0.014260722,
0.08802569,
-0.037736766,
0.029445928,
-0.028643936,
0.10217973,
-0.0660917,
0.022864237,
0.042151757,
-1.4814046e-08,
0.030838449,
0.043877687,
-0.0245681,
-0.09818859,
0.056659035,
0.0929652,
-0.010337853,
-0.0983916,
0.018008571,
-0.0131424805,
0.026400762,
0.008793538,
-0.05285605,
-0.042175982,
0.030133193,
0.01710666,
-0.06242493,
-0.018753909,
-0.015986755,
-0.018400662,
-0.026477808,
0.010281372,
-0.030476814,
-0.084556945,
-0.05402664,
0.010030052,
0.029531356,
0.13555466,
0.033426728,
0.12098221,
0.040777553,
0.008206964,
-0.018235989,
-0.0568263,
-0.1289943,
0.12416113,
-0.053454727,
-0.038151894,
0.030221034,
0.019807614,
0.047819767,
0.029434063,
0.0015704447,
0.0611775,
-0.05557245,
-0.030236417,
0.10799873,
-0.07073352,
-0.08215229,
0.004518122,
-0.015573616,
-0.013696145,
-0.0023438279,
0.026377691,
-0.015769389,
0.016251203,
-0.04062322,
-0.013962793,
-0.08309221,
0.031991288,
0.049991824,
-0.0038595141,
0.07031122,
0.0049263495
]
]
}
},
"is_streaming": false
}
}