[Bug]: OpenRouter Problems
Version
Command-line (Python) version
Operating System
MacOS
What happened?
I'm using OPENROUTER.
Things work fine... until they don't.
Previously I used ChatGPT 4 (open AI directly) and it was all working.
Switched to OpenRouter - and got these errors. Tried 3 different models, same problem.
Current master branch (cloned today).
---------- GPT PILOT EXITING WITH ERROR ----------
Traceback (most recent call last):
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 7136, in get
return clone.execute(database)[0]
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 4486, in __getitem__
return self.row_cache[item]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 6730, in get_or_create
return query.get(), False
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 7139, in get
raise self.model.DoesNotExist('%s instance matching query does '
database.models.architecture.ArchitectureDoesNotExist: <Model: Architecture> instance matching query does not exist:
SQL: SELECT "t1"."app_id", "t1"."created_at", "t1"."updated_at", "t1"."step", "t1"."app_data", "t1"."data", "t1"."messages", "t1"."completed", "t1"."completed_at", "t1"."architecture" FROM "architecture" AS "t1" WHERE ("t1"."app_id" = ?) LIMIT ? OFFSET ?
Params: ['55619a7a542843d9aa8d5918f18daa6f', 1, 0]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/mac/work/AI/gpt-pilot/pilot/main.py", line 97, in <module>
started = project.start()
File "/Users/mac/work/AI/gpt-pilot/pilot/helpers/Project.py", line 173, in start
self.architect.get_architecture()
File "/Users/mac/work/AI/gpt-pilot/pilot/helpers/agents/Architect.py", line 105, in get_architecture
save_progress(self.project.args['app_id'], self.project.current_step, {
File "/Users/mac/work/AI/gpt-pilot/pilot/database/database.py", line 184, in save_progress
progress, created = ProgressTable.get_or_create(app=app, defaults=data)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 6732, in get_or_create
raise exc
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 6727, in get_or_create
return cls.create(**kwargs), True
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 6596, in create
inst.save(force_insert=True)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 6806, in save
pk = self.insert(**field_dict).execute()
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 1971, in inner
return method(self, database, *args, **kwargs)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 2042, in execute
return self._execute(database)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 2847, in _execute
return super(Insert, self)._execute(database)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 2560, in _execute
cursor = database.execute(self)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 3259, in execute
return self.execute_sql(sql, params)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 3251, in execute_sql
cursor.execute(sql, params or ())
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 3019, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 192, in reraise
raise value.with_traceback(tb)
File "/Users/mac/work/AI/gpt-pilot/venv/lib/python3.9/site-packages/peewee.py", line 3251, in execute_sql
cursor.execute(sql, params or ())
peewee.IntegrityError: NOT NULL constraint failed: architecture.architecture
Hey @andr0s thanks for reporting this. Which models did you try to use with openrouter?
@senko
#MODEL_NAME=gpt-4-turbo-preview #MODEL_NAME=codellama/codellama-70b-instruct #MODEL_NAME=anthropic/claude-2 MODEL_NAME=google/gemini-pro
last 3 surely caused this issue. Not sure about gpt4 though (the first one), as I may confuse it with the time when I used it directly via openai (i.e. not thru the openrouter layer).
But the issue looks pretty common, I couldn't even go any far with it, it's really critical in my opinion because it makes gpt pilot absolutely unusable - at least with openrouter