Repository: modelscope/evalscope
Issue: API模型服务评测embeddings报错
Root cause: Configuration Error

使用API模型服务评测embeddings报错，脚本如下：
```
from evalscope import TaskConfig
task_cfg = TaskConfig(
    eval_backend='RAGEval',
    eval_config={
        'tool': 'MTEB',
        'model': [
            {
                'model_name': 'bge-m3',
                'api_base': 'http://10.1.30.3:8000/v1/',
                'api_key': 'sk-',
                'dimensions': 1024,
                'encode_kwargs': {
                    'batch_size': 10,
                },
            }
        ],
        'eval': {
            'tasks': [
                'T2Retrieval',
            ],
            'verbosity': 2,
            'overwrite_results': True,
            'limits': 30,
        },
    },
)

from evalscope.run import run_task
run_task(task_cfg=task_cfg)
```
报错日志如下：
````
025-04-14 11:33:24,784 - datasets.builder - INFO - Found cached dataset t2_retrieval-qrels (/root/.cache/modelscope/hub/datasets/C-MTEB___t2_retrieval-qrels/default-5f2523aab06dcfc9/0.0.0/master)
Loading Dataset info from /root/.cache/modelscope/hub/datasets/C-MTEB___t2_retrieval-qrels/default-5f2523aab06dcfc9/0.0.0/master
2025-04-14 11:33:24,784 - datasets.info - INFO - Loading Dataset info from /root/.cache/modelscope/hub/datasets/C-MTEB___t2_retrieval-qrels/default-5f2523aab06dcfc9/0.0.0/master
2025-04-14 11:33:29,444 - mteb.abstasks.AbsTaskRetrieval - INFO - Subset: default
2025-04-14 11:33:29,444 - mteb.evaluation.evaluators.RetrievalEvaluator - INFO - Encoding Queries.
2025-04-14 11:33:29,444 - mteb.models.sentence_transformer_wrapper - INFO - No model prompts found for task=T2Retrieval prompt_type=query
2025-04-14 11:33:29,444 - mteb.models.sentence_transformer_wrapper - INFO - Encoding 30 sentences.
  0%|                                                                                                                 | 0/3 [00:00<?, ?it/s]
2025-04-14 11:33:29,585 - mteb.evaluation.MTEB - ERROR - Error while evaluating T2Retrieval: Error code: 400 - {'object': 'error', 'message': 'dimensions is currently not supported', 'type': 'BadRequestError', 'param': None, 'code': 400}
Traceback (most recent call last):
  File "/root/lgy/eval.py", line 29, in <module>
    run_task(task_cfg=task_cfg)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/run.py", line 31, in run_task
    return run_single_task(task_cfg, run_time)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/run.py", line 42, in run_single_task
    result = run_non_native_backend(task_cfg, outputs)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/run.py", line 89, in run_non_native_backend
    backend_manager.run()
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/backend/rag_eval/backend_manager.py", line 82, in run
    self.run_mteb(model_args, eval_args)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/backend/rag_eval/backend_manager.py", line 46, in run_mteb
    one_stage_eval(model_args_list[0], eval_args)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/backend/rag_eval/cmteb/task_template.py", line 38, in one_stage_eval
    results = evaluation.run(model, **eval_args)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/evaluation/MTEB.py", line 477, in run
    raise e
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/evaluation/MTEB.py", line 438, in run
    results, tick, tock = self._run_eval(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/evaluation/MTEB.py", line 301, in _run_eval
    results = task.evaluate(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/abstasks/AbsTaskRetrieval.py", line 312, in evaluate
    scores[hf_subset] = self._evaluate_subset(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/abstasks/AbsTaskRetrieval.py", line 321, in _evaluate_subset
    results = retriever(corpus, queries)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/evaluation/evaluators/RetrievalEvaluator.py", line 489, in __call__
    return self.retriever.search(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/evaluation/evaluators/RetrievalEvaluator.py", line 138, in search
    query_embeddings = self.model.encode(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/evaluation/evaluators/RetrievalEvaluator.py", line 425, in encode
    return self.model.encode(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/mteb/models/sentence_transformer_wrapper.py", line 99, in encode
    embeddings = self.model.encode(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/evalscope/backend/rag_eval/utils/embedding.py", line 184, in encode
    response = self.model.embed_documents(texts[i:i + self.batch_size], chunk_size=self.batch_size)
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/langchain_openai/embeddings/base.py", line 577, in embed_documents
    response = self.client.create(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/openai/resources/embeddings.py", line 128, in create
    return self._post(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/openai/_base_client.py", line 1242, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/openai/_base_client.py", line 919, in request
    return self._request(
  File "/root/anaconda3/envs/evalscope/lib/python3.10/site-packages/openai/_base_client.py", line 1023, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'object': 'error', 'message': 'dimensions is currently not supported', 'type': 'BadRequestError', 'param': None, 'code': 400}
````

bge-m3使用vllm部署，接收到的请求报错日志如下：
````
INFO:     10.0.102.68:48456 - "POST /v1/embeddings HTTP/1.1" 400 Bad Request
````

## Eval1Scope 版本 / Version (必须)
v0.14.0

## 使用的工具 / Tools Used
- [x] RAGEval backend

## 运行环境 / Runtime Environment

- 操作系统 / Operating System:
  - [x] Ubuntu

- Python版本 / Python Version:
  - [x] 3.10

设置`'dimensions': None`再试试

> 设置`'dimensions': None`再试试

可以了

> 感谢你的反馈！我们将关闭此问题。如果您有任何疑问，请随时重新打开它。如果EvalScope对您有所帮助，欢迎给我们点个STAR以示支持，谢谢！