.Net: Python: Bug: OpenAPI plugin sends array and boolean query parameters as Python repr (tags=['a', 'b'], active=True)
Los mantenedores suelen responder en 3 días
@jeevan1098 ya está trabajando en esto.
Desde el 12/11/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with python/semantic_kernel/connectors/openapi_plugin/models/rest_api_operation.py, especially the query, header, and path parameter handling cited in the issue, and check how the .NET OpenAPI plugin serializes arrays. Use the offline httpx.MockTransport reproduction to inspect the captured URL. Done means array query values use repeated keys and booleans are lowercase; account for the linked open pull request before starting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The OpenAPI plugin builds the query string with urlencode(segments) and passes argument values through unchanged:
Without doseq=True, urlencode calls str() on each value. So an array query parameter is sent as Python's list repr (['red', 'blue']), and a boolean is sent as True/False. APIs can't parse either. OpenAPI's default for query parameters is style: form, explode: true, which means tags=red&tags=blue and active=true. The .NET OpenAPI plugin already serializes arrays this way.
The schema advertised to the model says {"type": "array", "items": {"type": "string"}}, so a tool call from the model hits this.
Header and path parameters have the same problem, since they use str(argument) (L218, L331).
To Reproduce
semantic-kernel 1.47.0. rest_api_operation.py is the same on main (25bd1bb6). This runs offline: httpx.MockTransport captures the request, and the server is an IP literal so the URL validator doesn't need DNS.
import asyncio, httpx
from semantic_kernel import Kernel
from semantic_kernel.connectors.openapi_plugin import OpenAPIFunctionExecutionParameters
spec = {
"openapi": "3.0.1", "info": {"title": "t", "version": "1"},
"servers": [{"url": "https://93.184.216.34"}],
"paths": {"/items": {"get": {
"operationId": "listItems",
"parameters": [
{"name": "tags", "in": "query", "schema": {"type": "array", "items": {"type": "string"}}},
{"name": "active", "in": "query", "schema": {"type": "boolean"}},
],
"responses": {"200": {"description": "ok"}},
}}},
}
seen = []
def handler(request):
seen.append(str(request.url))
return httpx.Response(200, json={})
async def main():
client = httpx.AsyncClient(transport=httpx.MockTransport(handler))
kernel = Kernel()
plugin = kernel.add_plugin_from_openapi(
"api", openapi_parsed_spec=spec,
execution_settings=OpenAPIFunctionExecutionParameters(http_client=client),
)
await kernel.invoke(plugin["listItems"], tags=["red", "blue"], active=True)
print(seen[0])
asyncio.run(main())
Output:
https://93.184.216.34/items?tags=%5B%27red%27%2C+%27blue%27%5D&active=True
Expected behavior
https://93.184.216.34/items?tags=red&tags=blue&active=true
(form/explode, the OpenAPI default for query parameters), with booleans written as JSON true/false.
Platform
- Language: Python
- Source: semantic-kernel 1.47.0 (pip) /
mainat 25bd1bb6 - AI model: n/a (no model call needed)
- IDE: n/a
- OS: Windows 11, Python 3.12
Additional context
The parser doesn't read style/explode from the spec yet (RestApiParameter is always built without them), so the smallest fix is to serialize lists as repeated keys (doseq=True) and booleans as lowercase. Happy to send a fix if that helps.
- Lenguaje dominante
- C#
- Estrellas
- 28.8k
- Forks
- 4.9k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 48
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/semantic-kernel
-
Python: Bug: ChatMessageContent.from_element drops AudioContent and BinaryContent into raw TextContentPosiblemente ocupada @halcyon-past la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/semantic-kernel#14824 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Python: Bug: Redis search returns None for every field that declares a storage_name, because RETURN lists the declared namePosiblemente ocupada @wasim-builds la tomó hace 9 días. Abiertopython triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/semantic-kernel#14753 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
.Net: gpt-image-1 is the default image model in the .NET OpenAI connector, and OpenAI shuts it down on October 23Posiblemente ocupada @nightcityblade la tomó hace 46 días. Abierto.NET triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
microsoft/semantic-kernel#14526 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Python: VolatileMemoryStore.get_batch and get_nearest_matches ignore with_embeddings=False (deepcopy result is discarded)Posiblemente ocupada @VANDRANKI la tomó hace 48 días. Abiertopython triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/semantic-kernel#14522 ·
Los mantenedores suelen responder en 3 días
-
.Net: Bug: BinaryContent does not decode the %xx escapes of a non-base64 data URIPosiblemente ocupada @Laurianti la tomó hace 48 días. Abierto.NET triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microsoft/semantic-kernel#14518 ·
Los mantenedores suelen responder en 3 días
Todos los issues de microsoft/semantic-kernel
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Support Flux ignore rules (drift detection ignore paths) in Microsoft.KubernetesConfiguration schemaAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Azure/azure-resource-manager-schemas#3921 ·
Los mantenedores suelen responder en 1 día
-
text-align: justify is ignored in HTML to PDF conversionPosiblemente ocupada @PrzemyslawKlys la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
asyncapi/modelina#2709 · 1 comentario ·
Los mantenedores suelen responder en 1 día