Vector Store: Does file extension matter? + Request for .cs support

Hello All,

I’m currently developing in C# and I’m using Vector Stores to upload code files for awareness. Right now I’m uploading .cs files as .txt as vector store API doesn’t allow .cs files.

I was wondering how several things are working on the openai side, if anyone has information…

  1. During indexing, does Vector Store rely on file extension, MIME type, or content analysis to determine how code is parsed/chunked?

  2. If I upload C# files as .txt with text/plain, could that reduce retrieval quality (e.g., losing code-aware chunking, language cues, or snippet extraction)?

  3. Would it be better if I upload the files as .c files

Suggestion / Feature Request

  • If relevant, please consider allowing of .cs files with adapted parsing/chunking.

Thanks in advance for any pointers or information.

EDIT : Actually, I just found .cs files should be supported,
but when trying to upload .cs files I get this error :

message: Invalid extension cs. Supported formats: c, cpp, css, csv, doc, docx, gif, go, html, java, jpeg, jpg, js, json, md, pdf, php, pkl, png, pptx, py, rb, tar, tex, ts, txt, webp, xlsx, xml, zip

1 Like